style: responsive breadcrumbs and headers for dashboard, projects, project issues, cycles, cycle issues, module issues (#3580)
This commit is contained in:
parent
751b15a7a7
commit
4b2a9c8335
14 changed files with 1065 additions and 500 deletions
|
|
@ -13,10 +13,11 @@ type Props = {
|
|||
placement?: Placement;
|
||||
disabled?: boolean;
|
||||
tabIndex?: number;
|
||||
menuButton?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const FiltersDropdown: React.FC<Props> = (props) => {
|
||||
const { children, title = "Dropdown", placement, disabled = false, tabIndex } = props;
|
||||
const { children, title = "Dropdown", placement, disabled = false, tabIndex, menuButton } = props;
|
||||
|
||||
const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);
|
||||
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
|
||||
|
|
@ -33,7 +34,9 @@ export const FiltersDropdown: React.FC<Props> = (props) => {
|
|||
return (
|
||||
<>
|
||||
<Popover.Button as={React.Fragment}>
|
||||
<Button
|
||||
{menuButton ? <button role="button" ref={setReferenceElement}>
|
||||
{menuButton}
|
||||
</button> : <Button
|
||||
disabled={disabled}
|
||||
ref={setReferenceElement}
|
||||
variant="neutral-primary"
|
||||
|
|
@ -46,7 +49,7 @@ export const FiltersDropdown: React.FC<Props> = (props) => {
|
|||
<div className={`${open ? "text-custom-text-100" : "text-custom-text-200"}`}>
|
||||
<span>{title}</span>
|
||||
</div>
|
||||
</Button>
|
||||
</Button>}
|
||||
</Popover.Button>
|
||||
<Transition
|
||||
as={Fragment}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue