Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new Toolbar component #236

Merged
merged 12 commits into from
Feb 28, 2023
Merged

feat: add new Toolbar component #236

merged 12 commits into from
Feb 28, 2023

Conversation

karrui
Copy link
Collaborator

@karrui karrui commented Feb 15, 2023

Toolbar component is currently going to be used by the Table component, but could also imagine it being used for a Text Editor

Part of #237

New components exposed:

  • Toolbar, parent container that passes all the props in
  • ToolbarGroup, sets preset spacing, optional
  • ToolbarButton, button for toolbar
  • ToolbarIconButton, icon button for toolbar
  • ToolbarDivider, divider for toolbar

Story has been added to show how to use the component

// Example usage
const Example = ({ children, size, colorScheme }) => {
  return (
    <Toolbar size={size} colorScheme={colorScheme}>
      <Text>1 item selected</Text>
      <Spacer />
      {children}
      <ToolbarGroup>
        <ToolbarButton leftIcon={<BxUpload fontSize="1.25rem" />}>
          Download
        </ToolbarButton>
        <ToolbarButton leftIcon={<BxsTimeFive fontSize="1.25rem" />}>
          Move
        </ToolbarButton>
        <ToolbarDivider />
        <ToolbarIconButton icon={<BxUpload />} aria-label="Upload" />
        <ToolbarDivider />
        <ToolbarButton>Cancel</ToolbarButton>
      </ToolbarGroup>
    </Toolbar>
  )
}

@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for objective-bell-0ffbfb canceled.

Name Link
🔨 Latest commit 2fff7c8
🔍 Latest deploy log https://app.netlify.com/sites/objective-bell-0ffbfb/deploys/63ecaa90bf609000081a1ddd

@karrui karrui merged commit 8a6275a into main Feb 28, 2023
@karrui karrui deleted the feat/table/toolbar-component branch February 28, 2023 10:12
@karrui karrui mentioned this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant