From ba9e8d6708e8b44ac49c7fa8ce51a1ffeb0cd763 Mon Sep 17 00:00:00 2001 From: jangheon Pyo Date: Fri, 26 Jan 2024 13:42:05 +0900 Subject: [PATCH] =?UTF-8?q?TButton=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=B6=94=EA=B0=80=20=EB=B0=8F?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TButton/TButton.jsx | 16 +++- .../components/TButton/TButton.module.less | 74 ++++++++++++++++--- .../src/style/CommonStyle.module.less | 13 ---- 3 files changed, 77 insertions(+), 26 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TButton/TButton.jsx b/com.twin.app.shoptime/src/components/TButton/TButton.jsx index bd272cc2..737b38f1 100644 --- a/com.twin.app.shoptime/src/components/TButton/TButton.jsx +++ b/com.twin.app.shoptime/src/components/TButton/TButton.jsx @@ -10,17 +10,24 @@ import { Marquee, MarqueeController } from "@enact/ui/Marquee"; const SIZES = { small: "small", - medium: "medium", large: "large", + full: "full", }; const TYPES = { normal: "normal", - withIcon: "withIcon", + // withIcon: "withIcon", // 추후 추가 예정 terms: "terms", agree: "agree", + popup: "popup", }; +const COLOR = { + basic: "basic", + white: "white", + gray: "gray", +}; // white: default color + const SpottableComponent = Spottable("div"); function TButtonBase({ @@ -33,6 +40,7 @@ function TButtonBase({ disabled, selected, type = "normal", + color = "basic", size = "large", withMarquee = false, isIntro = false, @@ -80,8 +88,10 @@ function TButtonBase({ css.tButton, css[type], css[size], + css[color], isFocused && css.focused, selected && css.selected, + disabled ? css.disabled : null, className ? className : null )} spotlightId={spotlightId} @@ -105,4 +115,4 @@ const TButton = ButtonDecorator(TButtonBase); export default TButton; -export { TYPES, SIZES }; +export { TYPES, SIZES, COLOR }; diff --git a/com.twin.app.shoptime/src/components/TButton/TButton.module.less b/com.twin.app.shoptime/src/components/TButton/TButton.module.less index 4e4537cf..efbbdb6f 100644 --- a/com.twin.app.shoptime/src/components/TButton/TButton.module.less +++ b/com.twin.app.shoptime/src/components/TButton/TButton.module.less @@ -3,17 +3,16 @@ .tButton { // common style - display: flex; - justify-content: center; - align-items: center; - box-sizing: border-box; - background-size: contain; - background-color: @BTN_MAIN_GREY; + width: auto; + height: 78px; + line-height: 78px; + display: inline-block; + background-color: #7a808d; color: @COLOR_WHITE; - font-family: @baseFont; - border-radius: @btnRadius; - padding: 0 12px; + border-radius: 12px; + .font (@baseFontBold, 30px); transition: all 0.1s ease; + padding: 0 12px; .text { white-space: nowrap; @@ -29,11 +28,66 @@ } } + &.small { + min-width: 180px; + max-width: 300px; + height: 60px; + line-height: 60px; + font-size: 24px; + border-radius: 6px; + } + &.large { + min-width: 324px; + max-width: 650px; + letter-spacing: -0.75px; + } + &.full { + width: 100%; + } + &.basic { + &.disabled { + background-color: #7a808d; + } + } + &.gray { + background-color: @COLOR_GRAY03; + &.disabled { + color: #fff; + background-color: @COLOR_GRAY03; + } + } + &.white { + color: @COLOR_GRAY03; + background-color: @COLOR_WHITE; + &:hover, + &:active, + &:focus-within, + &:focus { + box-shadow: 0px 18px 28.2px 1.8px rgba(62, 59, 59, 0.4); + background-color: @PRIMARY_COLOR_RED; + color: @COLOR_WHITE; + } + &.disabled { + color: @COLOR_GRAY02; + background-color: @COLOR_WHITE; + border: 1px solid #dadada; + } + } + + &.popup { + min-width: 240px; + max-width: 340px; + } + &.focused { background-color: @PRIMARY_COLOR_RED; .focusDropShadow(); } + &.disabled { + opacity: 0.3; + } + &.terms { background-color: @COLOR_WHITE; .flex(@justifyCenter: space-between); @@ -96,7 +150,7 @@ box-shadow: 0px 18px 28.2px 1.8px rgba(0, 0, 0, 0.4); font-size: 40px; // line-height: normal; - background: @PRIMARY_COLOR_RED; + background-color: @PRIMARY_COLOR_RED; color: @COLOR_WHITE; } } diff --git a/com.twin.app.shoptime/src/style/CommonStyle.module.less b/com.twin.app.shoptime/src/style/CommonStyle.module.less index a5c6607b..851a4351 100644 --- a/com.twin.app.shoptime/src/style/CommonStyle.module.less +++ b/com.twin.app.shoptime/src/style/CommonStyle.module.less @@ -47,21 +47,8 @@ @COLOR_NAVY: #2c343f; @COLOR_SKYBLUE: #e7ebef; -/* BUTTON */ -@BTN_MAIN_GREY: #7a808d; -@BTN_SUB_GREY: @COLOR_GRAY03; - /* ----- 추가 CommonStyles (chw) ----- */ -/* Button */ -@btnRadius: 12px; -@btnPadding: 12px; - .focusDropShadow() { box-shadow: 0 0 50px rgba(0, 0, 0, 0.5); } - -/* Text Button */ -@LargeTextBtnHeight: 78px; -@SmallTextBtnHeight: 60px; -@cateTabTwoFixWidth: 240px;