Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Bertrand committed Aug 9, 2024
1 parent cd82bb0 commit f6f60fa
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion apps/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react": "^18.2.0",
"react-dom": "^18",
"react-i18next": "^14.0.0",
"react-live": "^4.1.5",
"react-live": "^4.1.7",
"react-native": "0.73.6",
"react-native-reanimated": "^3.6.2",
"react-native-unistyles": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { useTranslation } from 'react-i18next';
import { TemplatePrimitive } from '../../templatePrimitive';
import { Anchor } from '@crossed/ui';
import { Anchor, YBox } from '@crossed/ui';
import { TemplateDescriptionProps } from '../../TemplateDescriptionProps';

export default function CreateBadge() {
Expand Down Expand Up @@ -39,8 +39,12 @@ import { Anchor } from "@crossed/ui"
const MyComponent = () => {
return (<Anchor>Write your text here</Anchor>)
}`}
example={`<Anchor>I'm a Link</Anchor>`}
scope={{ Anchor }}
example={`<YBox>
<Anchor>I'm a Link</Anchor>
<Anchor primary={false}>I'm a Link</Anchor>
<Anchor underline={false}>I'm a Link</Anchor>
</YBox>`}
scope={{ Anchor, YBox }}
/>
);
}
16 changes: 8 additions & 8 deletions apps/documentation/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function Home() {
<Box role="main" style={useStyles.container} space="lg">
<Logo size={100} />
<H1 size={'md'}>Crossed</H1>
<H2 size="md" weight="md" {...useStyles.description.rnw()}>
<H2 size="md" weight="md" style={useStyles.description}>
<Trans>
Explore our ecosystem to develop cross-platform applications with
<br />
Expand All @@ -92,7 +92,7 @@ export default function Home() {
</ButtonIcon>
</Button>
<YBox space="lg" style={useStyles.sectionCta}>
<H3 {...useStyles.title.rnw()}>
<H3 style={useStyles.title}>
<Trans>Cross platform ecosystem</Trans>
</H3>
<Box space="sm" style={useStyles.containerButtonCta}>
Expand All @@ -101,11 +101,11 @@ export default function Home() {
<Card.Title
role="heading"
aria-level={4}
{...useStyles.cardTitle.rnw()}
style={useStyles.cardTitle}
>
@crossed/styled
</Card.Title>
<Card.Description {...useStyles.cardDescription.rnw()}>
<Card.Description style={useStyles.cardDescription}>
<Trans>Styled your component</Trans>
</Card.Description>
</Card>
Expand All @@ -115,11 +115,11 @@ export default function Home() {
<Card.Title
role="heading"
aria-level={4}
{...useStyles.cardTitle.rnw()}
style={useStyles.cardTitle}
>
@crossed/primitive
</Card.Title>
<Card.Description {...useStyles.cardDescription.rnw()}>
<Card.Description style={useStyles.cardDescription}>
<Trans>Create your accessible component from anything</Trans>
</Card.Description>
</Card>
Expand All @@ -129,11 +129,11 @@ export default function Home() {
<Card.Title
role="heading"
aria-level={4}
{...useStyles.cardTitle.rnw()}
style={useStyles.cardTitle}
>
@crossed/ui
</Card.Title>
<Card.Description {...useStyles.cardDescription.rnw()}>
<Card.Description style={useStyles.cardDescription}>
<Trans>
UI Component made with @crossed/primitive and @crossed/styled
</Trans>
Expand Down
2 changes: 1 addition & 1 deletion apps/documentation/src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const CodeBlock = ({
>
{preview && <LivePreview Component={Component} />}
<YBox>
{fileName && <Text {...styles.pre.rnw()}>{fileName}</Text>}
{fileName && <Text style={styles.pre}>{fileName}</Text>}
<LiveEditor
theme={themes.dracula}
{...styles.liveEditor.className({
Expand Down
5 changes: 1 addition & 4 deletions apps/documentation/src/components/SideBarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ const Item = ({ href, title, menus }: Nav) => {
hover={href === pathname || hover}
style={style}
>
<MenuList.Title
{...menuStyle.itemText.rnw()}
weight={hover ? 'lg' : 'md'}
>
<MenuList.Title style={menuStyle.itemText} weight={hover ? 'lg' : 'md'}>
{t(title)}
</MenuList.Title>
</MenuList.Item>
Expand Down
4 changes: 2 additions & 2 deletions apps/documentation/src/components/TOCLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const TOCLayout = ({

{links.length > 0 && (
<MenuList style={styles.menuList}>
<MenuList.Label {...styles.menuLabel.rnw()} weight="lg">
<MenuList.Label style={styles.menuLabel} weight="lg">
{t('On this page')}
</MenuList.Label>
{links.map(({ href, title }) => {
Expand Down Expand Up @@ -172,7 +172,7 @@ const Item = ({
}}
>
<MenuList.Title
{...menuStyle.itemText.rnw()}
style={menuStyle.itemText}
weight={href === hash ? 'lg' : undefined}
>
{t(title)}
Expand Down
9 changes: 5 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6f60fa

Please sign in to comment.