-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): disabled button, improv secret input, http label (#2597)
## Describe your changes - Fix button disabled state - Fix secret input buttons display - Fix clicking copy/show in some secrets input would trigger form - Fix http label to be generic - Import tailwind colors from figma
- Loading branch information
1 parent
c104877
commit f0e05be
Showing
13 changed files
with
169 additions
and
176 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { cva } from 'class-variance-authority'; | ||
import { cn } from '../utils/utils'; | ||
import type { HTTP_VERB } from '@nangohq/types'; | ||
|
||
const styles = cva('', { | ||
variants: { | ||
bg: { | ||
GET: 'bg-green-base-35', | ||
POST: 'bg-blue-base-35', | ||
PUT: 'bg-yellow-base-35', | ||
PATCH: 'bg-orange-base-35', | ||
DELETE: 'bg-red-base-35' | ||
}, | ||
text: { | ||
GET: 'text-green-base', | ||
POST: 'text-blue-base', | ||
PUT: 'text-yellow-base', | ||
PATCH: 'text-orange-base', | ||
DELETE: 'text-red-base' | ||
} | ||
} | ||
}); | ||
|
||
export const HttpLabel: React.FC<{ verb: HTTP_VERB; path: string }> = ({ verb, path }) => { | ||
return ( | ||
<div className="flex items-center gap-2 text-[11px]"> | ||
<div className={cn(styles({ bg: verb }), 'py-0.5 px-2 rounded')}> | ||
<span className={cn(styles({ text: verb }), 'font-semibold')}>{verb}</span> | ||
</div> | ||
<span className="break-all text-sm">{path}</span> | ||
</div> | ||
); | ||
}; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.