Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f16b297
Adds initial Accordian components
jonthomp May 29, 2021
5fdda7e
Adds headlessui Disclousure
jonthomp May 30, 2021
3f00d36
Uses Typography in stories
jonthomp May 30, 2021
a414f57
Adds some styling
jonthomp May 30, 2021
3b8b271
Adds defaultActiveId functionality
jonthomp May 31, 2021
5afd593
Adds className to IconContext
jonthomp May 31, 2021
6300dde
Adds icon and iconPosition functionality
jonthomp May 31, 2021
f6ddaf0
Adds border to opened button
jonthomp May 31, 2021
5c6df8f
Adds stories for icon and iconPosition
jonthomp May 31, 2021
7f1c5c2
Wraps label in Typography
jonthomp May 31, 2021
d284cf5
Adds borders between items
jonthomp May 31, 2021
d29fc50
Renames accordian to accordion
jonthomp May 31, 2021
c6ff7b6
Exports Accordian from package root
jonthomp May 31, 2021
8f8bbe8
Removes max width from item label
jonthomp Jun 1, 2021
ba73060
Adds open/close transitions to panel
jonthomp Jun 1, 2021
4a70196
Drops the icon by a px
jonthomp Jun 1, 2021
385a12e
Makes defaultActiveId expect an array to allow for multiple default a…
jonthomp Jun 1, 2021
8a0d110
Adds an onChange callback
jonthomp Jun 1, 2021
b9ad397
Uses Typeography.Text for label
jonthomp Jun 1, 2021
7d39aa0
Pads with px-6 and py-4
jonthomp Jun 1, 2021
5ba236a
Adds sbui-icon class to Icon and IconBase
jonthomp Jun 1, 2021
4c92d45
Applies icon rotation in css module
jonthomp Jun 1, 2021
8a8c894
Uses tailwind classes for borders
jonthomp Jun 2, 2021
6a1270d
chore: add to rollup build input
MildTomato Jun 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 18 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
card: 'src/components/Card/index.tsx',
badge: 'src/components/Badge/index.tsx',
alert: 'src/components/Alert/index.tsx',
accordian: 'src/components/Accordian/index.tsx',
tabs: 'src/components/Tabs/index.tsx',
menu: 'src/components/Menu/index.tsx',
modal: 'src/components/Modal/index.tsx',
Expand Down
72 changes: 72 additions & 0 deletions src/components/Accordion/Accordion.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.sbui-accordion-container {
@apply flex flex-col rounded-md;
}

.sbui-accordion-container--bordered {
@apply border border-solid;
@apply bg-white border-gray-200;
@apply dark:bg-dark-700 dark:border-darkmode;
}

.sbui-accordion-item {
@apply w-full;
}

.sbui-accordion-item__button {
@apply flex justify-between w-full text-left cursor-pointer px-6 py-4 border-0 border-solid font-medium text-base rounded-t-md bg-transparent;

@apply border-gray-200 text-gray-500 hover:text-gray-600;
@apply dark:border-darkmode dark:text-dark-200 dark:hover:text-white;

font-family: inherit;
font-weight: inherit;
}

.sbui-accordion-item__button .sbui-typography-text {
@apply w-full max-w-none;
}

.sbui-accordion-item__button .sbui-typography-text:last-child {
@apply pl-2;
}

.sbui-accordion-item__button .sbui-icon {
@apply mt-px;
}

.sbui-accordion-item__button--open .sbui-icon {
@apply transform rotate-180;
}

.sbui-accordion-container--bordered
.sbui-accordion-item__button:not(:first-child) {
@apply rounded-none border-t border-gray-200 dark:border-darkmode;
}

.sbui-accordion-item__panel {
@apply px-6 py-4;
}

.sbui-accordion-item__panel--enter {
@apply transition-max-height ease-in-out duration-700 overflow-hidden;
}

.sbui-accordion-item__panel--enterFrom {
@apply max-h-0;
}

.sbui-accordion-item__panel--enterTo {
@apply max-h-screen;
}

.sbui-accordion-item__panel--leave {
@apply transition-max-height ease-in-out duration-300 overflow-hidden;
}

.sbui-accordion-item__panel--leaveFrom {
@apply max-h-screen;
}

.sbui-accordion-item__panel--leaveTo {
@apply max-h-0;
}
Loading