Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
}
],
"import/extensions": ["error", "ignorePackages"],
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/no-duplicates": [
"error",
{
"prefer-inline": true
}
],
"simple-import-sort/imports": [
"error",
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function FilterCategoryMenu({
<p>{label}</p>
<Menu
renderButton={({ onOpen }) => (
<button onClick={onOpen}>
<button type='button' onClick={onOpen}>
<span>{buttonLabel}</span>
<ChevronDownIcon />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function ShowAllDevicesButton({
const label = expanded ? t.showLess : t.showAll(totalDeviceCount)

return (
<button className='show-all-devices-button' onClick={onClick}>
<button type='button' className='show-all-devices-button' onClick={onClick}>
<ChevronRightIcon /> {label}
</button>
)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ui/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function Action(props: ActionProps): JSX.Element | null {

return (
<div className='seam-alert-action-wrap'>
<button onClick={handleClick} className='seam-alert-action'>
<button type='button' onClick={handleClick} className='seam-alert-action'>
{props.label}
</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function IconButton({
return (
<button
{...props}
type='button'
ref={elRef}
className={classNames(
'seam-icon-btn',
Expand Down
2 changes: 2 additions & 0 deletions src/lib/ui/Snackbar/Snackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function Snackbar({
<div className='seam-snackbar-actions-wrap'>
{action != null && (
<button
type='button'
className='seam-snackbar-action'
onClick={handleActionClick}
>
Expand All @@ -85,6 +86,7 @@ export function Snackbar({
)}
{!disableCloseButton && (
<button
type='button'
className='seam-snackbar-close-button'
onClick={() => {
handleClose()
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/TabSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function TabButton<TabType extends string>({
'seam-tab-button',
isActive && 'seam-tab-button-active'
)}
type='button'
onClick={handleClick}
>
<p className='seam-tab-button-label'>{title}</p>
Expand Down
6 changes: 5 additions & 1 deletion src/lib/ui/TextButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export function TextButton({
...buttonProps
}: TextButtonProps): JSX.Element {
return (
<button className={`seam-text-btn seam-color-${color}`} {...buttonProps} />
<button
type='button'
className={`seam-text-btn seam-color-${color}`}
{...buttonProps}
/>
)
}
1 change: 1 addition & 0 deletions src/lib/ui/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export const TextField = forwardRef<
<div className='seam-adornment seam-end'>
{clearable && (
<button
type='button'
className={classNames({
'seam-hidden': valueIsEmpty,
})}
Expand Down
6 changes: 5 additions & 1 deletion src/lib/ui/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export function Tooltip({ children }: PropsWithChildren): JSX.Element {
return (
<div className='seam-tooltip'>
<div className='seam-tooltip-trigger-wrap'>
<button onClick={handleToggle} className='seam-tooltip-button'>
<button
type='button'
onClick={handleToggle}
className='seam-tooltip-button'
>
<div className='seam-tooltip-button-icon seam-tooltip-button-icon-default'>
<InfoIcon />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/device/EditableDeviceName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function IconButton(
return (
<button
{...props}
type='button'
className={classNames(
'seam-editable-device-name-icon-button',
props.className
Expand Down
6 changes: 5 additions & 1 deletion src/lib/ui/layout/AccordionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export function AccordionRow({

return (
<div className='seam-accordion-row' aria-expanded={isExpanded}>
<button className='seam-accordion-row-trigger' onClick={toggle}>
<button
type='button'
className='seam-accordion-row-trigger'
onClick={toggle}
>
<div className='seam-row-inner-wrap'>
<p className='seam-row-label'>{label}</p>
<div className='seam-row-trigger-left-content'>{leftContent}</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/thermostat/ClimateModeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function ClimateModeMenu({
<Menu
renderButton={({ onOpen }) => (
<button
type='button'
style={style}
onClick={onOpen}
className={classNames(
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/thermostat/FanModeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function FanModeMenu({
<Menu
renderButton={({ onOpen }) => (
<button
type='button'
onClick={onOpen}
className={classNames(
'seam-fan-mode-menu-button',
Expand Down
12 changes: 10 additions & 2 deletions src/lib/ui/thermostat/TemperatureControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export function TemperatureControl({

return (
<div className='seam-temperature-control'>
<button className='seam-temperature-stepper-button' onClick={decrement}>
<button
type='button'
className='seam-temperature-stepper-button'
onClick={decrement}
>
<TemperatureSubtractIcon />
</button>
<RangeSlider
Expand All @@ -43,7 +47,11 @@ export function TemperatureControl({
}}
unit={unit}
/>
<button className='seam-temperature-stepper-button' onClick={increment}>
<button
type='button'
className='seam-temperature-stepper-button'
onClick={increment}
>
<TemperatureAddIcon />
</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/ui/thermostat/ThermostatCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function Content(props: ThermostatCardProps): JSX.Element | null {
onEdit={props.onEditName}
/>
<button
type='button'
onClick={toggleTemperatureUnit}
className='seam-thermostat-temperature-toggle'
>
Expand Down
Loading