mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
fix(studio): tidy the head row, the layouts tab and the theme panel
Every piece of the head row is one raised tile of one height: the format picker moved beside the tools, the assistant and help stand alone, the close button is square like the rest, and the beta mark is gone. The layouts tab lays the book's own and the built-in layouts out in sections and in the same grid as the designed pages. In the theme panel the accent dots sit in the sheet's corner, the three accents share one name, a font keeps its name ahead of its kind, a doubled rule is gone, and the inspector's empty hint is shorter.
This commit is contained in:
@@ -67,7 +67,11 @@ function ThemeCard({
|
||||
);
|
||||
}
|
||||
|
||||
/** One palette entry: its colour, which is the picker, and its name. */
|
||||
/**
|
||||
* One palette entry: its colour, which is the picker, and its name. The three
|
||||
* accents share one name under them, so each shows its colour alone and says
|
||||
* its own name to a screen reader and on hover.
|
||||
*/
|
||||
function PaletteEntry({
|
||||
name,
|
||||
hex,
|
||||
@@ -79,13 +83,14 @@ function PaletteEntry({
|
||||
onPick: (hex: string) => void;
|
||||
t: StudioT;
|
||||
}) {
|
||||
const accent = name.startsWith('accent');
|
||||
const label = t(`studio.theme.token.${name}`);
|
||||
return (
|
||||
<label className="st-theme-colour">
|
||||
<label className="st-theme-colour" title={label}>
|
||||
<span className="st-theme-chip" style={{ background: hex }}>
|
||||
<input type="color" value={hex} aria-label={label} onChange={(e) => onPick(e.target.value)} />
|
||||
</span>
|
||||
<span className="st-theme-colour-name">{label}</span>
|
||||
{!accent && <span className="st-theme-colour-name">{label}</span>}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
@@ -181,6 +186,7 @@ export function StudioThemePanel({ t }: { t: StudioT }) {
|
||||
t={t}
|
||||
/>
|
||||
))}
|
||||
<span className="st-theme-colour-name st-theme-accents-name">{t('studio.theme.accents')}</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user