-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add migration guide from v1 to v2 (#406)
--------- Signed-off-by: Nikolai Lopin <[email protected]> Co-authored-by: martimalek <[email protected]>
- Loading branch information
1 parent
ac8e9b8
commit c1c0afa
Showing
7 changed files
with
422 additions
and
55 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
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,38 @@ | ||
import React from 'react'; | ||
import { Source } from '@storybook/blocks'; | ||
|
||
import { Table, TableCell, TableHeaderCell, TableRow } from '../../../src/components/Table'; | ||
|
||
const codemodsExample = `import styled from 'styled-components'; | ||
export const GreyList = styled.ul\` | ||
color: var(--wave-b-color-blue-primary-550); | ||
\`; | ||
`; | ||
|
||
const polishedExample = `import styled from 'styled-components'; | ||
import {getSemanticValue} from '@freenow/wave'; | ||
export const GreyList = styled.ul\` | ||
color: \${getSemanticValue('foreground-neutral-emphasized')}; | ||
\`; | ||
`; | ||
|
||
export const CssVariablesMigrationTable = () => ( | ||
<Table rowStyle="blank"> | ||
<thead> | ||
<TableHeaderCell>After codemods</TableHeaderCell> | ||
<TableHeaderCell>Polished code</TableHeaderCell> | ||
</thead> | ||
<tbody> | ||
<TableRow> | ||
<TableCell verticalAlign="top"> | ||
<Source code={codemodsExample} /> | ||
</TableCell> | ||
<TableCell verticalAlign="top"> | ||
<Source code={polishedExample} /> | ||
</TableCell> | ||
</TableRow> | ||
</tbody> | ||
</Table> | ||
); |
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,91 @@ | ||
import React from 'react'; | ||
import { Table, TableCell, TableHeaderCell, TableRow } from '../../../src/components/Table'; | ||
|
||
export const IconMappingsTable: React.FC = () => ( | ||
<Table rowStyle="zebra" rowSize="small"> | ||
<thead> | ||
<TableRow> | ||
<TableHeaderCell>Removed icons</TableHeaderCell> | ||
<TableHeaderCell>Alternative</TableHeaderCell> | ||
</TableRow> | ||
</thead> | ||
<tbody> | ||
<TableRow> | ||
<TableCell>BackwardSmallIcon</TableCell> | ||
<TableCell>BackwardLastIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ChevronDownSmallIcon</TableCell> | ||
<TableCell>ChevronDownIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ChevronLeftSmallIcon</TableCell> | ||
<TableCell>ChevronLeftIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ChevronRightSmallIcon</TableCell> | ||
<TableCell>ChevronRightIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ChevronUpSmallIcon</TableCell> | ||
<TableCell>ChevronUpIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>DownloadSmallIcon</TableCell> | ||
<TableCell>DownloadIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ForwardSmallIcon</TableCell> | ||
<TableCell>ForwardLastIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>SearchSmallIcon</TableCell> | ||
<TableCell>MagnifyingGlassIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>XSmallIcon</TableCell> | ||
<TableCell>CloseIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>AirportIcon</TableCell> | ||
<TableCell>PlaneIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>EcoIcon</TableCell> | ||
<TableCell>LeafSolidIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>GearIcon</TableCell> | ||
<TableCell>CogIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>HeartIcon</TableCell> | ||
<TableCell>HeartSolidIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>HomeIcon</TableCell> | ||
<TableCell>HouseIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>InfoCircleIcon</TableCell> | ||
<TableCell>InfoCircleOutlineIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>ListUnorderedIcon</TableCell> | ||
<TableCell>ListIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>PrebookingIcon</TableCell> | ||
<TableCell>CalendarCheckedIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>SearchIcon</TableCell> | ||
<TableCell>MagnifyingGlassIcon</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>XIcon</TableCell> | ||
<TableCell>CloseIcon</TableCell> | ||
</TableRow> | ||
</tbody> | ||
</Table> | ||
); |
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,45 @@ | ||
import React from 'react'; | ||
import { Source } from '@storybook/blocks'; | ||
|
||
import { Table, TableCell, TableHeaderCell, TableRow } from '../../../src/components/Table'; | ||
|
||
const codemodsExample = `<Box> | ||
<InvertedColorScheme> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</InvertedColorScheme> | ||
<InvertedColorScheme> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</InvertedColorScheme> | ||
</Box>`; | ||
|
||
const polishedExample = `<InvertedColorScheme> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</InvertedColorScheme>`; | ||
|
||
export const InvertedPropMigrationTable = () => ( | ||
<Table rowStyle="blank"> | ||
<thead> | ||
<TableHeaderCell>After codemods</TableHeaderCell> | ||
<TableHeaderCell>Polished code</TableHeaderCell> | ||
</thead> | ||
<tbody> | ||
<TableRow> | ||
<TableCell verticalAlign="top"> | ||
<Source code={codemodsExample} /> | ||
</TableCell> | ||
<TableCell verticalAlign="top"> | ||
<Source code={polishedExample} /> | ||
</TableCell> | ||
</TableRow> | ||
</tbody> | ||
</Table> | ||
); |
6 changes: 3 additions & 3 deletions
6
docs/components/PlacementMappingsTable.tsx → ...ents/migration/PlacementMappingsTable.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
Oops, something went wrong.