Conversation
- isUnderlineプロパティをLinkPropsインターフェースから削除 - Linkコンポーネント内のisUnderlineに関連するコードを削除 - ストーリーからisUnderlineに関連する例を削除
- isUnderlineプロパティを削除し、デフォルトでアンダーラインスタイルを適用 - 外部リンクアイコンの表示ロジックを修正 - テストケースを簡素化し、可読性を向上
- Linkコンポーネントのストーリーにレイアウトを「centered」に設定
- Figmaとの接続を設定 - LinkコンポーネントのプロパティをFigmaにマッピング - コード例を追加
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies the Link component by removing the underline variant option and updating the color scheme. The component now always displays with an underline and uses info color tokens instead of primary colors.
- Removed
isUnderlineprop and related variant system, making underlines always visible - Updated color scheme from
primary-600/700toinfo-500/600 - Added Figma Connect integration for design system synchronization
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/ui/link/index.tsx | Simplified component by removing variant system and updating color tokens |
| src/components/ui/link/index.test.tsx | Updated tests to reflect removed underline variants and new color scheme |
| src/components/ui/link/index.stories.tsx | Removed underline-related story and controls from Storybook |
| src/components/ui/link/index.figma.tsx | Added new Figma Connect integration file |
| @@ -1,27 +1,9 @@ | |||
| import React from "react"; | |||
| import { VariantProps, cva } from "class-variance-authority"; | |||
| import { cn } from "@/lib/utils"; | |||
There was a problem hiding this comment.
The cn utility import is still present but may no longer be needed since the linkVariants function that used it has been removed. Consider removing this import if it's not used elsewhere in the component.
| { isUnderline, isExternalLink = false, children, className = "", ...props }, | ||
| ref | ||
| ) => { | ||
| ({ isExternalLink = false, children, className = "", ...props }, ref) => { |
There was a problem hiding this comment.
isExternalLinkをisOpenInNewにしたいです!
内部リンクであっても新規ウィンドウないしタブで開く物はその手がかりを付けなきゃいけないという観点から命名が変更になりました🙏
- isExternalLinkをisOpenInNewに変更 - Figma接続の例を更新 - ストーリーとテストでのプロパティ名を修正
概要
以下の指摘事項の修正と調整
https://www.notion.so/goodpatch-design-div/Link-cf8f723bc3f04a2e84ed011773011c22?source=copy_link
変更内容
動作確認
pnpm lintを実行pnpm buildを実行してプロジェクトが正常にビルドされることを確認pnpm testを実行してテストがすべて成功することを確認関連 Issue