Icon small button variant (#6525)
* Icon small button variant * Rename * Update CVA + Update button WIP * add ticket ref and fix padding * Update button and all uses of Icon button * SB deployment test * Fixing type error * Fix lint * Add icon button to canvas Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
18246e0dc1
commit
cfaecc3e02
37 files changed
+145
-93
No files matched your search
@@ -66,7 +66,7 @@ const ApiKeyListItem = ({
|
||||
<div>
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" size="icon" color="secondary" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" variant="icon" color="secondary" StartIcon={Icon.FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
<DropdownMenuContent>
|
||||
|
||||
@@ -164,7 +164,7 @@ const PendingMemberItem = (props: { member: TeamMember; index: number; teamId: n
|
||||
<Button
|
||||
data-testid="remove-member-button"
|
||||
StartIcon={Icon.FiTrash2}
|
||||
size="icon"
|
||||
variant="icon"
|
||||
color="secondary"
|
||||
className="h-[36px] w-[36px]"
|
||||
onClick={() => {
|
||||
|
||||
@@ -133,7 +133,7 @@ export default function MemberListItem(props: Props) {
|
||||
disabled={!props.member.accepted}
|
||||
onClick={() => (props.member.accepted ? setShowTeamAvailabilityModal(true) : null)}
|
||||
color="secondary"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiClock}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -143,7 +143,7 @@ export default function MemberListItem(props: Props) {
|
||||
href={"/" + props.member.username}
|
||||
color="secondary"
|
||||
className={classNames(!editMode ? "rounded-r-md" : "")}
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiExternalLink}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -154,7 +154,7 @@ export default function MemberListItem(props: Props) {
|
||||
className="h-[36px] w-[36px] bg-transparent px-0 py-0 hover:bg-transparent focus:bg-transparent focus:outline-none focus:ring-0 focus:ring-offset-0">
|
||||
<Button
|
||||
color="secondary"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
className="rounded-r-md"
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
@@ -197,7 +197,7 @@ export default function MemberListItem(props: Props) {
|
||||
<div className="flex md:hidden">
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" size="icon" color="minimal" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" variant="icon" color="minimal" StartIcon={Icon.FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
{props.member.accepted && (
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function TeamInviteListItem(props: Props) {
|
||||
<Button
|
||||
type="button"
|
||||
className="mr-3 border-gray-700"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
color="secondary"
|
||||
onClick={declineInvite}
|
||||
StartIcon={Icon.FiSlash}
|
||||
@@ -98,7 +98,7 @@ export default function TeamInviteListItem(props: Props) {
|
||||
<Button
|
||||
type="button"
|
||||
className="border-gray-700"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
color="secondary"
|
||||
onClick={acceptInvite}
|
||||
StartIcon={Icon.FiCheck}
|
||||
@@ -107,7 +107,7 @@ export default function TeamInviteListItem(props: Props) {
|
||||
<div className="block sm:hidden">
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="minimal" size="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" color="minimal" variant="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem>
|
||||
|
||||
@@ -115,7 +115,7 @@ export default function TeamListItem(props: Props) {
|
||||
<div className="block sm:hidden">
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="minimal" size="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" color="minimal" variant="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem>
|
||||
@@ -150,14 +150,19 @@ export default function TeamListItem(props: Props) {
|
||||
);
|
||||
showToast(t("link_copied"), "success");
|
||||
}}
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiLink}
|
||||
/>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild className="radix-state-open:rounded-r-md">
|
||||
<Button type="button" color="secondary" size="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button
|
||||
type="button"
|
||||
color="secondary"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent hidden={hideDropdown}>
|
||||
{isAdmin && (
|
||||
|
||||
@@ -143,7 +143,7 @@ export default function WorkflowListPage({ workflows }: Props) {
|
||||
<Button
|
||||
type="button"
|
||||
color="secondary"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiEdit2}
|
||||
onClick={async () => await router.replace("/workflows/" + workflow.id)}
|
||||
/>
|
||||
@@ -155,7 +155,7 @@ export default function WorkflowListPage({ workflows }: Props) {
|
||||
setwWorkflowToDeleteId(workflow.id);
|
||||
}}
|
||||
color="secondary"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiTrash2}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -167,7 +167,7 @@ export default function WorkflowListPage({ workflows }: Props) {
|
||||
<Button
|
||||
type="button"
|
||||
color="minimal"
|
||||
size="icon"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
@@ -296,7 +296,12 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div>
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="minimal" size="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button
|
||||
type="button"
|
||||
color="minimal"
|
||||
variant="icon"
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem>
|
||||
|
||||
@@ -44,7 +44,7 @@ function WorkflowsPage() {
|
||||
CTA={
|
||||
session.data?.hasValidLicense && data?.workflows && data?.workflows.length > 0 ? (
|
||||
<Button
|
||||
size="fab"
|
||||
variant="fab"
|
||||
StartIcon={Icon.FiPlus}
|
||||
onClick={() => createMutation.mutate()}
|
||||
loading={createMutation.isLoading}>
|
||||
|
||||
Reference in new issue
Block a user