07d3da102d
Updated 3 more examples to TypeScript. Changes to individual examples pushed as separate commits. - Swapped `cxs/lite` for `cxs`, as it's the only mode supported by `@types/cxs`. ## Documentation / Examples - [X] Make sure the linting passes by running `pnpm build && pnpm lint` - [X] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
29 lines
424 B
TypeScript
29 lines
424 B
TypeScript
import cxs from 'cxs'
|
|
|
|
const cx = {
|
|
root: cxs({
|
|
width: 80,
|
|
height: 60,
|
|
background: 'white',
|
|
':hover': {
|
|
background: 'black',
|
|
},
|
|
}),
|
|
|
|
title: cxs({
|
|
marginLeft: 5,
|
|
color: 'black',
|
|
fontSize: 22,
|
|
':hover': {
|
|
color: 'white',
|
|
},
|
|
}),
|
|
}
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div className={cx.root}>
|
|
<h1 className={cx.title}>My page</h1>
|
|
</div>
|
|
)
|
|
}
|