teachable-design-system 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,2 @@
1
+ export * from "./icons";
1
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAGvD,wBAAgB,OAAO,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAC,EAAE,YAAY,2CAmCtE"}
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAGvD,wBAAgB,OAAO,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAC,EAAE,YAAY,2CAqCtE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teachable-design-system",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -1 +1 @@
1
- // export * from "./icons" 형식으로
1
+ export * from "./icons";
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import {DropdownProps} from "../../types/Dropdown.types";
3
3
  import {StyledBox, StyledDropDown, StyledText, StyledLabel, StyledIcon, StyledOptions, StyledOption} from "./style";
4
- import { arrowDownIconBase64 } from '../../assets/icons';
4
+ import arrowDownIcon from '../../assets/icons/arrow-down.png';
5
5
 
6
6
  export function Dropdown({size, options, onSelect, label, placeholder, width}: DropdownProps) {
7
7
  const [open, setOpen] = React.useState(false);
@@ -39,7 +39,7 @@ export function Dropdown({size, options, onSelect, label, placeholder, width}: D
39
39
  isOpen={open}
40
40
  >{selected ?? placeholder}</StyledText>
41
41
  <StyledIcon size={size}>
42
- <img src={arrowDownIconBase64} alt="dropdown icon" style={{width:'100%', height:'100%'}}/>
42
+ <img src={arrowDownIcon} alt="dropdown icon" style={{width:'100%', height:'100%'}}/>
43
43
  </StyledIcon>
44
44
  </StyledBox>
45
45
  </StyledDropDown>
@@ -10,7 +10,7 @@ import {
10
10
  } from './style'
11
11
  import { Button } from "../Button/Button";
12
12
  import {SidebarProps} from "../../types/Sidebar.types";
13
- import { iconSizeBase64 } from "../../assets/icons";
13
+ import icon from "../../assets/icons/icon_size.png"
14
14
 
15
15
  export function Sidebar({buttonStyle, description, title}: SidebarProps) {
16
16
 
@@ -29,10 +29,12 @@ export function Sidebar({buttonStyle, description, title}: SidebarProps) {
29
29
  <StyledDescription>
30
30
  {title.map((item, index) => (
31
31
  <StyledDisclosure>
32
- <StyledTitle onClick={() => toggleSection(index)} style={{ cursor: 'pointer' }}>
33
- <StyledIcon src={iconSizeBase64} alt="icon" isOpen={openSections[index]} />
34
- {item}
35
- </StyledTitle> {openSections[index] && (
32
+ <StyledTitle onClick={() => toggleSection(index)} style={{ cursor: 'pointer' }}>
33
+ <StyledIcon src={icon} alt="icon" isOpen={openSections[index]} />
34
+ {item}
35
+ </StyledTitle>
36
+
37
+ {openSections[index] && (
36
38
  <StyledOpenContents>
37
39
  {description[index].map((option, i) => (
38
40
  <StyledOpenContentsText key={i}>{option}</StyledOpenContentsText>