-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
b87f13c
commit 25579cf
Showing
2 changed files
with
41 additions
and
0 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,35 @@ | ||
import { css } from "@root/styled-system/css"; | ||
import { stack } from "@root/styled-system/patterns"; | ||
import { slider } from "@root/styled-system/recipes"; | ||
|
||
import { applyStyle, cssFgVar } from "./utils"; | ||
|
||
const classes = { | ||
root: stack({ gap: "4", p: "6", rounded: "xl" }), | ||
progress: slider(), | ||
heading: css({ textStyle: "body-lg", fontWeight: "500" }), | ||
percentage: css({ textStyle: "body-sm" }), | ||
content: css({ display: "flex", alignItems: "center", justifyContent: "space-between" }), | ||
}; | ||
|
||
export function Sample12() { | ||
return ( | ||
<article className={classes.root} style={{ ...applyStyle("bg"), ...applyStyle("color") }}> | ||
<div className={classes.content}> | ||
<p className={classes.heading}>Project Progress</p> | ||
<span className={classes.percentage}>80%</span> | ||
</div> | ||
<div className={classes.progress.root}> | ||
<div | ||
className={`${classes.progress.track} ${css({ height: "2!" })}`} | ||
style={applyStyle("bg", { fromVar: cssFgVar, alpha: "0.16" })} | ||
> | ||
<div | ||
className={classes.progress.range} | ||
style={{ width: "80%", ...applyStyle("bg", { fromVar: cssFgVar, alpha: "1" }) }} | ||
/> | ||
</div> | ||
</div> | ||
</article> | ||
); | ||
} |
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