@team-monolith/cds 1.17.3 → 1.18.0

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.
@@ -7,10 +7,8 @@ export interface PopoverProps {
7
7
  content?: React.ReactNode;
8
8
  /** 좌측 아이콘 */
9
9
  icon?: React.ReactNode;
10
- /** 우측 버튼 텍스트 */
11
- buttonLabel?: string;
12
- /** 우측 버튼 클릭시 동작 */
13
- onButtonClick?: () => void;
10
+ /** 우측 버튼 */
11
+ button?: React.ReactNode;
14
12
  }
15
13
  declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
16
14
  export default Popover;
@@ -2,12 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
3
  import React from "react";
4
4
  import shadows from "../foundation/shadows";
5
- import { RESET_BUTTON } from "../utils/reset";
6
- import { HOVER } from "../utils/hover";
7
5
  import { css } from "@emotion/react";
8
6
  const Popover = React.forwardRef((props, ref) => {
9
- const { className, headline, content, icon, buttonLabel, onButtonClick } = props;
10
- return (_jsxs(Container, Object.assign({ ref: ref, className: className }, { children: [icon && _jsx(Icon, { children: icon }), _jsxs(ContentArea, { children: [headline && _jsx(Headline, { children: headline }), content && _jsx(Content, { children: content })] }), buttonLabel && (_jsx(PopoverButton, Object.assign({ type: "button", onClick: onButtonClick }, { children: buttonLabel })))] })));
7
+ const { className, headline, content, icon, button } = props;
8
+ return (_jsxs(Container, Object.assign({ ref: ref, className: className }, { children: [icon && _jsx(Icon, { children: icon }), _jsxs(ContentArea, { children: [headline && _jsx(Headline, { children: headline }), content && _jsx(Content, { children: content })] }), button] })));
11
9
  });
12
10
  export default Popover;
13
11
  const Container = styled.div(({ theme }) => css `
@@ -42,18 +40,3 @@ const Headline = styled.div `
42
40
  const Content = styled.div `
43
41
  font-weight: 400;
44
42
  `;
45
- const PopoverButton = styled.button(({ theme }) => css `
46
- ${RESET_BUTTON}
47
- margin: 4px;
48
- padding: 6px 8px;
49
- cursor: pointer;
50
- background-color: ${theme.color.background.primary};
51
- color: ${theme.color.background.neutralAlt};
52
- font-size: 14px;
53
- line-height: 16px;
54
- border-radius: 8px;
55
- ${HOVER(css `
56
- color: ${theme.color.foreground.neutralAlt};
57
- background: ${theme.color.background.primaryActive};
58
- `)}
59
- `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.17.3",
3
+ "version": "1.18.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,