mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 14:29:54 +08:00
* Migrate Studio actions to the component library and add a UI inspector * Read inspector counts after mount and wait for live updates in Chrome --------- Co-authored-by: 罗高 <luogao@users.noreply.github.com>
22 lines
958 B
TypeScript
22 lines
958 B
TypeScript
import { Button } from 'open-design-ui/button';
|
|
import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
|
|
interface PrimaryNavigationRailProps extends ComponentPropsWithoutRef<'nav'> {
|
|
footer?: ReactNode;
|
|
}
|
|
|
|
export function PrimaryNavigationRail({ children, footer, className = '', ...props }: PrimaryNavigationRailProps) {
|
|
return (
|
|
<nav {...props} className={`om-primary-navigation ${className}`}>
|
|
<div className="om-primary-navigation-group">{children}</div>
|
|
{footer && <div className="om-primary-navigation-group om-primary-navigation-footer">{footer}</div>}
|
|
</nav>
|
|
);
|
|
}
|
|
|
|
export const PrimaryNavigationButton = forwardRef<HTMLButtonElement, ComponentPropsWithoutRef<'button'>>(
|
|
function PrimaryNavigationButton({ className = '', type = 'button', ...props }, ref) {
|
|
return <Button variant="plain" {...props} ref={ref} type={type} className={`om-primary-navigation-button ${className}`} />;
|
|
},
|
|
);
|