-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore: #272 v5-label-component-deprecated-existing * chore: #272 v5-label component deprecated existing fix linter * chore: #272 v5-label component deprecated existing fix stories * chore: #272 v5-label component deprecated existing fix stories * chore: #272-v5-label-component-deprecated-existing add detail in deprecated info * chore: #272-v5-label-component-deprecated-existing add detail in deprecated info --------- Co-authored-by: foxy <foxy@foxy.com>
- Loading branch information
Showing
27 changed files
with
79 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { styled } from '@linaria/react' | ||
|
||
/** @deprecated This style is deprecated and will be removed in future releases. */ | ||
export const ElDeprecatedLabel = styled.label` | ||
font-size: var(--font-size-small); | ||
color: var(--neutral-500); | ||
` |
4 changes: 2 additions & 2 deletions
4
...tests__/__snapshots__/label.test.tsx.snap → ...tests__/__snapshots__/label.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Label component > should match a snapshot 1`] = ` | ||
exports[`DeprecatedLabel component > should match a snapshot 1`] = ` | ||
<DocumentFragment> | ||
<label | ||
class="mocked-styled-0 el-label" | ||
class="mocked-styled-0 el-deprecated-label" | ||
/> | ||
</DocumentFragment> | ||
`; |
6 changes: 3 additions & 3 deletions
6
...components/label/__tests__/label.test.tsx → ...deprecated-label/__tests__/label.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { render } from '@testing-library/react' | ||
import { Label } from '..' | ||
import { DeprecatedLabel } from '..' | ||
|
||
describe('Label component', () => { | ||
describe('DeprecatedLabel component', () => { | ||
it('should match a snapshot', () => { | ||
const wrapper = render(<Label />) | ||
const wrapper = render(<DeprecatedLabel />) | ||
expect(wrapper.asFragment()).toMatchSnapshot() | ||
}) | ||
}) |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/components/label/label.mdx → src/components/deprecated-label/label.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { DeprecatedLabel } from './index' | ||
|
||
export default { | ||
title: 'DeprecatedLabel', | ||
component: DeprecatedLabel, | ||
} | ||
|
||
export const BasicUsage = { | ||
render: ({}) => <DeprecatedLabel>I'm a label for a form input or something else</DeprecatedLabel>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React, { FC, LabelHTMLAttributes } from 'react' | ||
import { ElDeprecatedLabel } from './__styles__' | ||
|
||
/** @deprecated will be replaced by new v5 LabelProps*/ | ||
export interface DeprecatedLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {} | ||
|
||
/** @deprecated will be replaced by new v5 Label */ | ||
export const DeprecatedLabel: FC<DeprecatedLabelProps> = ({ children, ...rest }) => { | ||
return <ElDeprecatedLabel {...rest}>{children}</ElDeprecatedLabel> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.