-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathAnnounce.tsx
35 lines (31 loc) · 972 Bytes
/
Announce.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/** @jsxImportSource @emotion/react */
import { type HTMLAttributes, type ReactNode } from 'react'
import { Wrapper } from './primitives/Wrapper'
type AnnounceProps = {
children: ReactNode
} & HTMLAttributes<HTMLElement>
export function Announce({ children, ...props }: AnnounceProps) {
return (
<div
css={{
'--focus': '#fff',
// standard styling (blue)
// background: 'var(--brand-bg)',
// special styling (orange gradient)
backgroundColor: 'var(--grad4-2)',
backgroundImage: `linear-gradient(116.01deg, var(--grad2-2), var(--grad2-1))`,
// color: 'var(--brand-text)',
color: 'var(--app-bg)', // ensures dark mode works with the gradient background
padding: '1rem',
textAlign: 'center',
'& a': {
color: 'var(--app-bg)',
textDecoration: 'underline',
},
}}
{...props}
>
<Wrapper>{children}</Wrapper>
</div>
)
}