diff --git a/packages/gatsby-plugin-wsui/src/WsuiProvider.js b/packages/gatsby-plugin-wsui/src/WsuiProvider.js index 8bbecfe8..0ce2a16b 100644 --- a/packages/gatsby-plugin-wsui/src/WsuiProvider.js +++ b/packages/gatsby-plugin-wsui/src/WsuiProvider.js @@ -11,7 +11,7 @@ import theme from "./theme.jsx"; export default function WsuiProvider({ children }) { return ( - + `/icons/${name}.svg`}> {children} diff --git a/packages/gatsby-theme-wordpress-basic/src/pages/__info/colors.jsx b/packages/gatsby-theme-wordpress-basic/src/pages/__info/colors.jsx index 89425c79..a5c91162 100644 --- a/packages/gatsby-theme-wordpress-basic/src/pages/__info/colors.jsx +++ b/packages/gatsby-theme-wordpress-basic/src/pages/__info/colors.jsx @@ -8,6 +8,7 @@ import { useThemeProps, PageSection, Heading, + Stack, } from "@wsui/base"; import chroma from "chroma-js"; import { omit } from "lodash/fp"; @@ -18,8 +19,13 @@ function getLightness(color) { return Math.round(1000 - color.get("oklch.l") * 1000); } +const SwatchList = styled.div` + display: flex; + gap: 0.5rem; +`; + const Swatch = styled.div` - width: 4rem; + width: 5rem; height: 3rem; text-align: center; display: flex; @@ -43,47 +49,55 @@ export default function ColorsInfoPage(props) { Colors
- - - {Object.keys(theme.colors).map((color) => ( - - - {["main", "hover"].map((shade) => ( - - ))} + + ), + )} + + {[ 20, 50, 100, 150, 200, 300, 400, 500, 600, 700, 800, ].map((shade) => ( - + + +
+ {shade} + {/*
+ {getLightness(theme.getColor([color, shade]))} */} +
+ {theme.getColor([color, shade])} +
+
))} - - ))} - -
{color} - + {Object.keys(theme.colors).map((color) => ( + + {color} + + {["main", "hover", "active", "active.hover"].map( + (shade) => ( + +
- {shade} + {shade}{" "} + {`(≈${ + Math.round( + getLightness( + theme.getColor([color, shade]), + ) / 5, + ) * 5 + })`}
- - {`(${getLightness( - theme.getColor([color, shade]), - )})`} - + {theme.getColor([color, shade])}
-
-
- -
- {shade} - {/*
- {getLightness(theme.getColor([color, shade]))} */} -
-
-
+ + + ))} +