mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
refactor(time-picker): draw the hour, minute and AM/PM columns with one spinner column
The three columns of the time picker each repeated the same chevron up, value box and chevron down markup. TimeSpinnerColumn draws one, and the button style it shares with the clear button moves to timeSpinnerStyle. The AM/PM column keeps its narrower box, smaller type and leading gap as props, and the hour and minute boxes keep their tabular digits.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import type { CSSProperties } from 'react';
|
||||
|
||||
/** The look of the time picker's small chevron and clear buttons. */
|
||||
export const spinnerButtonStyle: CSSProperties = {
|
||||
background: 'none',
|
||||
border: 'none',
|
||||
cursor: 'pointer',
|
||||
padding: 2,
|
||||
color: 'var(--text-faint)',
|
||||
display: 'flex',
|
||||
borderRadius: 4,
|
||||
transition: 'color 0.15s',
|
||||
};
|
||||
Reference in New Issue
Block a user