MCPcopy Create free account
hub / github.com/pomber/code-surfer / usePreStyle

Function usePreStyle

packs/themes/src/styles.tsx:41–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41function usePreStyle() {
42 const styles = useStyles();
43 const preSx = React.useMemo(() => {
44 const sx = {
45 ...styles.pre
46 };
47 Object.keys(styles.tokens).forEach(key => {
48 const classList = key
49 .split(/\s/)
50 .map(type => "." + getClassFromTokenType(type))
51 .join(", ");
52 sx[classList] = styles.tokens[key];
53 });
54 return sx;
55 }, [styles]);
56 return preSx;
57}
58
59const baseTitle: SxStyleProp = {
60 position: "absolute" as "absolute",

Callers 1

styles.tsxFile · 0.85

Calls 3

useStylesFunction · 0.85
getClassFromTokenTypeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected