Skip to content

Commit 6b8d8d0

Browse files
committed
refactor: replace button with common Button component in getUsedChartContent
1 parent 944db30 commit 6b8d8d0

File tree

1 file changed

+15
-10
lines changed
  • src/components/v2/appDetails/sourceInfo

1 file changed

+15
-10
lines changed

src/components/v2/appDetails/sourceInfo/utils.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ReactComponent as RightArrow } from '@Icons/ic-arrow-right.svg'
17+
import {
18+
Button,
19+
ButtonStyleType,
20+
ButtonVariantType,
21+
ComponentSizeType,
22+
Icon,
23+
} from '@devtron-labs/devtron-fe-common-lib'
1824

1925
export const getEnvironmentName = (
2026
clusterName: string,
@@ -45,15 +51,14 @@ export const getUsedChartContent = (isDeprecated: boolean, onClickUpgrade: () =>
4551
</div>
4652
)}
4753
</div>
48-
{/* Due to missing support of white text, unable to use Button component */}
49-
<button
50-
type="button"
51-
data-testid="chart-used-upgrade-button"
52-
className="flexbox dc__gap-6 dc__transparent cn-0 fs-12 fw-6 lh-20 p-0 dc__align-items-center"
54+
<Button
55+
dataTestId="chart-used-upgrade-button"
56+
variant={ButtonVariantType.text}
57+
style={ButtonStyleType.neutralWhite}
58+
size={ComponentSizeType.small}
5359
onClick={onClickUpgrade}
54-
>
55-
Go to Configure
56-
<RightArrow className="dc__no-shrink icon-dim-16 scn-0" />
57-
</button>
60+
endIcon={<Icon name="ic-arrow-right" color={null} />}
61+
text="Go to Configure"
62+
/>
5863
</div>
5964
)

0 commit comments

Comments
 (0)