-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
67 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
"node": ">=18" | ||
}, | ||
"dependencies": { | ||
"wowds-tokens": "^0.1.1", | ||
"wowds-ui": "^0.1.8" | ||
} | ||
} |
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,8 +1,19 @@ | ||
import { defineConfig } from "@pandacss/dev"; | ||
import commonConfig from "@wow-class/panda-config/common-config"; | ||
|
||
import { typography } from "wowds-tokens"; | ||
|
||
export default defineConfig({ | ||
...commonConfig, | ||
staticCss: { | ||
css: [ | ||
{ | ||
properties: { | ||
textStyle: Object.keys(typography), | ||
}, | ||
}, | ||
], | ||
}, | ||
dependencies: ["./src/components/**"], | ||
include: ["./src/**/*.{ts,tsx,js,jsx}"], | ||
}); |
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,34 @@ | ||
import { css } from "@styled-system/css"; | ||
import { styled } from "@styled-system/jsx"; | ||
import type { ColorToken } from "@styled-system/tokens"; | ||
import type { CSSProperties, PropsWithChildren } from "react"; | ||
import type { typography as typoType } from "wowds-tokens"; | ||
|
||
type ColorKey = ColorToken; | ||
type TypoKey = keyof typeof typoType; | ||
|
||
interface TextProps extends PropsWithChildren { | ||
typo?: TypoKey; | ||
color?: ColorKey; | ||
style?: CSSProperties; | ||
className?: string; | ||
} | ||
|
||
export const Text = ({ | ||
typo = "body0", | ||
color = "blue.100", | ||
children, | ||
...rest | ||
}: TextProps) => { | ||
return ( | ||
<styled.p | ||
className={css({ | ||
textStyle: typo, | ||
color: color, | ||
})} | ||
{...rest} | ||
> | ||
{children} | ||
</styled.p> | ||
); | ||
}; |
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,2 +1,3 @@ | ||
export * from "./Button"; | ||
export * from "./Modal"; | ||
export * from "./Text"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.