-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: real rollout list/quick edit/delete (#1857)
* feat(wip): rollout list ui + quickedit * chore: update some styles * chore: fix selected segment * feat: finish update/delete of rollout list * chore: fix linter * chore: add percent icon, hide slider in mobile * feat: make reset work:
- Loading branch information
1 parent
d4ff07a
commit db0fd10
Showing
18 changed files
with
712 additions
and
410 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
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
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,40 @@ | ||
import { classNames } from '~/utils/helpers'; | ||
|
||
export type ButtonProps = { | ||
children: React.ReactNode; | ||
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void; | ||
type?: 'button' | 'submit' | 'reset'; | ||
className?: string; | ||
title?: string; | ||
disabled?: boolean; | ||
}; | ||
|
||
export default function TextButton(props: ButtonProps) { | ||
const { | ||
className, | ||
onClick, | ||
children, | ||
type = 'button', | ||
title, | ||
disabled = false | ||
} = props; | ||
|
||
return ( | ||
<button | ||
type={type} | ||
onClick={(e) => { | ||
!disabled && onClick && onClick(e); | ||
}} | ||
className={classNames( | ||
disabled ? 'cursor-not-allowed' : 'cursor-hand', | ||
`mb-1 inline-flex items-center justify-center rounded-md border-0 text-sm font-medium text-gray-300 | ||
focus:outline-none | ||
enabled:text-gray-500 enabled:hover:text-gray-600 ${className}` | ||
)} | ||
disabled={disabled} | ||
title={title} | ||
> | ||
{children} | ||
</button> | ||
); | ||
} |
Oops, something went wrong.