feat(release): prepare 1.1.0 candidate
This commit is contained in:
parent
5a34f66981
commit
5205dcdfa9
736 changed files with 115667 additions and 12203 deletions
|
|
@ -2,7 +2,7 @@
|
|||
// RN용 Led — 작은 발광 원
|
||||
|
||||
import { View, type ViewStyle } from 'react-native'
|
||||
import { d3roNativePalette } from '../theme'
|
||||
import { useNativePalette } from '../theme-context'
|
||||
|
||||
export interface LedProps {
|
||||
color?: 'amber' | 'green' | 'red' | 'orange' | 'blue'
|
||||
|
|
@ -10,21 +10,21 @@ export interface LedProps {
|
|||
size?: number
|
||||
}
|
||||
|
||||
const COLOR_MAP: Record<string, string> = {
|
||||
amber: d3roNativePalette.accent.main,
|
||||
green: d3roNativePalette.tag.green,
|
||||
red: d3roNativePalette.tag.red,
|
||||
orange: d3roNativePalette.tag.orange,
|
||||
blue: d3roNativePalette.tag.blue
|
||||
}
|
||||
|
||||
export function Led({ color = 'amber', on = true, size = 8 }: LedProps): React.ReactElement {
|
||||
const c = COLOR_MAP[color] ?? d3roNativePalette.accent.main
|
||||
const palette = useNativePalette()
|
||||
const colorMap: Record<NonNullable<LedProps['color']>, string> = {
|
||||
amber: palette.accent.main,
|
||||
green: palette.tag.green,
|
||||
red: palette.tag.red,
|
||||
orange: palette.tag.orange,
|
||||
blue: palette.tag.blue
|
||||
}
|
||||
const c = colorMap[color]
|
||||
const style: ViewStyle = {
|
||||
width: size,
|
||||
height: size,
|
||||
borderRadius: size / 2,
|
||||
backgroundColor: on ? c : d3roNativePalette.led.off,
|
||||
backgroundColor: on ? c : palette.led.off,
|
||||
shadowColor: c,
|
||||
shadowOffset: { width: 0, height: 0 },
|
||||
shadowOpacity: on ? 0.8 : 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue