-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix modnotes footer control styles (#1009)
- Loading branch information
Showing
10 changed files
with
158 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
import {type ComponentPropsWithoutRef} from 'react'; | ||
import {type ComponentPropsWithoutRef, forwardRef} from 'react'; | ||
import {classes} from '../../util/ui_interop'; | ||
import css from './ActionButton.module.css'; | ||
|
||
export const ActionButton = ({ | ||
export const ActionButton = forwardRef< | ||
HTMLButtonElement, | ||
ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
} | ||
>(({ | ||
inline, | ||
className, | ||
...props | ||
}: ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
}) => ( | ||
}, ref) => ( | ||
<button | ||
className={classes(css.actionButton, inline && css.inline, className)} | ||
className={classes( | ||
css.actionButton, | ||
inline && css.inline, | ||
className, | ||
)} | ||
{...props} | ||
ref={ref} | ||
/> | ||
); | ||
)); |
29 changes: 29 additions & 0 deletions
29
extension/data/components/controls/ActionSelect.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.actionSelect { | ||
display: inline-block; | ||
vertical-align: bottom; | ||
padding: 5px 6px 4px 5px; | ||
font-family: verdana,arial,helvetica,sans-serif; | ||
font-size: 12px; | ||
line-height: 14px; | ||
background-color: #F7FAFD; | ||
border-radius: 1px; | ||
border-width: 1px 1px 2px 2px; | ||
border-color: #72869A; | ||
border-style: solid; | ||
color: #17324E; | ||
outline: none !important; | ||
} | ||
|
||
.actionSelect:active { | ||
border-width: 1px; | ||
border-color: #9FBAD6; | ||
padding: 5px 6px; | ||
outline: none !important; | ||
} | ||
|
||
.actionSelect.inline { | ||
padding: 3px 3px 2px 2px; | ||
} | ||
.actionSelect.inline:active { | ||
padding: 3px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {type ComponentPropsWithoutRef, forwardRef} from 'react'; | ||
import {classes} from '../../util/ui_interop'; | ||
import css from './ActionSelect.module.css'; | ||
|
||
export const ActionSelect = forwardRef< | ||
HTMLSelectElement, | ||
ComponentPropsWithoutRef<'select'> & { | ||
inline?: boolean; | ||
} | ||
>(({ | ||
inline, | ||
className, | ||
...props | ||
}, ref) => ( | ||
<select | ||
className={classes( | ||
css.actionSelect, | ||
inline && css.inline, | ||
className, | ||
)} | ||
{...props} | ||
ref={ref} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import {type ComponentPropsWithoutRef} from 'react'; | ||
import {type ComponentPropsWithoutRef, forwardRef} from 'react'; | ||
import {classes} from '../../util/ui_interop'; | ||
import css from './BracketButton.module.css'; | ||
|
||
export const BracketButton = ({ | ||
export const BracketButton = forwardRef< | ||
HTMLButtonElement, | ||
ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
} | ||
>(({ | ||
inline, | ||
className, | ||
...props | ||
}: ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
}) => ( | ||
}, ref) => ( | ||
<button | ||
className={classes(css.bracketButton, className)} | ||
{...props} | ||
ref={ref} | ||
/> | ||
); | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import {type ComponentPropsWithoutRef} from 'react'; | ||
import {type ComponentPropsWithoutRef, forwardRef} from 'react'; | ||
import {classes} from '../../util/ui_interop'; | ||
import css from './GeneralButton.module.css'; | ||
|
||
export const GeneralButton = ({ | ||
export const GeneralButton = forwardRef< | ||
HTMLButtonElement, | ||
ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
} | ||
>(({ | ||
inline, | ||
className, | ||
...props | ||
}: ComponentPropsWithoutRef<'button'> & { | ||
inline?: boolean; | ||
}) => ( | ||
}, ref) => ( | ||
<button | ||
className={classes(css.generalButton, className)} | ||
{...props} | ||
ref={ref} | ||
/> | ||
); | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.normalInput { | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
font-size: 12px; | ||
border: solid 1px #c7d6e7; | ||
font-size: 1em; | ||
padding: 5px 6px; | ||
height: 14px; | ||
line-height: 14px; | ||
background-color: #fff; | ||
color: #000; | ||
color-scheme: none; | ||
} | ||
|
||
.normalInput:focus-visible { | ||
outline-color: #9fbad7; | ||
border-color: #9fbad7; | ||
color-scheme: none; | ||
} | ||
|
||
.normalInput.inWindowContent { | ||
width: calc(100% - 16px); /* 16px = margin + border + padding */ | ||
} | ||
|
||
/* Adjust controls to work nicely together in footers */ | ||
.normalInput.inWindowFooter { | ||
border-color: #72869A; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {type ComponentPropsWithoutRef, forwardRef} from 'react'; | ||
import {classes} from '../../util/ui_interop'; | ||
import css from './NormalInput.module.css'; | ||
|
||
// TODO: this is a terrible name | ||
export const NormalInput = forwardRef< | ||
HTMLInputElement, | ||
ComponentPropsWithoutRef<'input'> & { | ||
inFooter?: boolean; | ||
} | ||
>(({ | ||
inFooter, | ||
className, | ||
...props | ||
}, ref) => ( | ||
<input | ||
className={classes( | ||
css.normalInput, | ||
inFooter && css.inWindowFooter, | ||
className, | ||
)} | ||
{...props} | ||
ref={ref} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
export * from './ActionButton'; | ||
export * from './ActionSelect'; | ||
export * from './BracketButton'; | ||
export * from './GeneralButton'; | ||
export * from './Icon'; | ||
export * from './NormalInput'; | ||
export * from './RelativeTime'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters