PageGrid.Date uses css modules
This commit is contained in:
1 parent
c98064e6de
commit
05cb9c4cef
2 files changed
+7
-7
No files matched your search
@@ -1,3 +1,5 @@
|
|||||||
|
import s from './date.module.css'
|
||||||
|
|
||||||
import { dateFormat } from 'src/lib/date'
|
import { dateFormat } from 'src/lib/date'
|
||||||
|
|
||||||
export type DateProps = {
|
export type DateProps = {
|
||||||
@@ -5,13 +7,7 @@ export type DateProps = {
|
|||||||
children: string | Date
|
children: string | Date
|
||||||
}
|
}
|
||||||
export const Date: React.FC<DateProps> = props => (
|
export const Date: React.FC<DateProps> = props => (
|
||||||
<p style={props.style}>
|
<p className={s.date} style={props.style}>
|
||||||
<style jsx>{`
|
|
||||||
p {
|
|
||||||
color: var(--color-text);
|
|
||||||
font-size: var(--font-size-second);
|
|
||||||
}
|
|
||||||
`}</style>
|
|
||||||
{dateFormat(props.children)}
|
{dateFormat(props.children)}
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.date {
|
||||||
|
color: var(--color-text);
|
||||||
|
font-size: var(--font-size-second);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user