- Create Figma access token and paste it in .env
- In the test repos package.json in devDependencies add "create-component": "file:/file_path"
- run
npm i
in the test repo
npx create-component --figma-link="link" --name=CardComponent
- --figma-link: pass figma_link of the component
- --name: name of the component (optional, default will be the name of the node in figma design)
- Use flex layout throughout to achieve an exact matching UI.
- Table Naming: table-table_name (e.g., table-sku_list)
- Table Headings: heading-content (e.g., heading-product_name)
- Table Data: data-content (e.g., data-price)
- Logos/Images/SVGs: image-image_name (e.g., image-empty_state)
There are two types of input fields:
- Direct Input Field
- Naming: input-input_name (e.g., input-armada_number)
- Input Field with Extra Elements (e.g., input with a search icon inside it). The structure is as follows:
- Input Box: inputbox-inputbox_name (e.g., inputbox-search)
- Icon inside Input: image-image_name (e.g., image-search_icon)
- Actual Input Field: input-input_name (e.g., input-search_query)