Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update components and add new file for order feature
- Loading branch information
Showing
9 changed files
with
57 additions
and
66 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
website/app/[locale]/(root)/docs/align-items/components/Overview.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
2 changes: 0 additions & 2 deletions
2
website/app/[locale]/(root)/docs/animation-direction/components/Overview.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
2 changes: 0 additions & 2 deletions
2
website/app/[locale]/(root)/docs/animation-fill-mode/components/Overview.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
2 changes: 0 additions & 2 deletions
2
website/app/[locale]/(root)/docs/float/components/Overview.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
25 changes: 25 additions & 0 deletions
25
website/app/[locale]/(root)/docs/order/components/Basic.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Code from 'websites/components/Code' | ||
import clsx from 'clsx' | ||
import Demo from 'websites/components/Demo' | ||
import DemoPanel from 'websites/components/DemoPanel' | ||
|
||
export default ({ className }: any) => { | ||
return ( | ||
<> | ||
<Demo> | ||
<div className="flex gap:10"> | ||
<div className="app-box neutral">1</div> | ||
<div className={clsx(className, 'app-box accent')}>2</div> | ||
<div className="app-box neutral">3</div> | ||
</div> | ||
</Demo> | ||
<Code lang="html">{` | ||
<div class="flex"> | ||
<div>1</div> | ||
<div class="**${className}**">2</div> | ||
<div>3</div> | ||
</div> | ||
`}</Code> | ||
</> | ||
) | ||
} |
47 changes: 16 additions & 31 deletions
47
website/app/[locale]/(root)/docs/order/components/Overview.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,33 +1,18 @@ | ||
'use client' | ||
|
||
import Demo from 'websites/components/Demo' | ||
import Code from 'websites/components/Code' | ||
import SyntaxTable from '~/components/SyntaxTable' | ||
import syntaxes from '../syntaxes' | ||
import line from 'to-line' | ||
import SyntaxTable from '~/components/SyntaxTable' | ||
import SyntaxTr from '~/components/SyntaxTr' | ||
import SyntaxPreview from './SyntaxPreview' | ||
|
||
export default () => | ||
<SyntaxTable value={syntaxes} default="order:first"> | ||
{(className: string) => | ||
<> | ||
<Demo className="py:0"> | ||
<div className="bg-stripe flex gap:10 p:10 w:full"> | ||
<div className="box o:-3">1</div> | ||
<div className="box o:-1">2</div> | ||
<div className={line(className, 'flex:1 box bg:blue-58! fg:white')}>{className}</div> | ||
<div className="box o:1">4</div> | ||
<div className="box o:3">5</div> | ||
</div> | ||
</Demo> | ||
<Code lang="html">{` | ||
<div class="flex"> | ||
<div class="o:-3">…</div> | ||
<div class="o:-1">…</div> | ||
<div class="**${className}**">…</div> | ||
<div class="o:1">…</div> | ||
<div class="o:3">…</div> | ||
</div> | ||
`}</Code> | ||
</> | ||
} | ||
</SyntaxTable> | ||
export default () => { | ||
const previewSyntax = 'order:0' | ||
return ( | ||
<> | ||
<SyntaxTable> | ||
{syntaxes.map((syntax) => | ||
<SyntaxTr value={syntax} key={syntax} previewSyntax={previewSyntax}></SyntaxTr>) | ||
} | ||
</SyntaxTable> | ||
<SyntaxPreview className={previewSyntax} /> | ||
</> | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
website/app/[locale]/(root)/docs/order/components/SyntaxPreview.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use client' | ||
|
||
import useSelectedPreviewSyntax from '~/utils/use-selected-preview-syntax' | ||
import Basic from './Basic' | ||
|
||
export default (props: any) => { | ||
return ( | ||
<Basic className={useSelectedPreviewSyntax(props.className)} /> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
const syntaxes = [['order:`value`', 'o:`value`'], ['o:first'], ['o:last']] | ||
const syntaxes = [ | ||
['order:`value`'], | ||
'order:0', | ||
'order:first', | ||
'order:last' | ||
] | ||
|
||
export default syntaxes |