Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tag Component added #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hyperloo wants to merge 3 commits into react95-io:master
base: master
Choose a base branch
Loading
from hyperloo:tags
Open

Tag Component added #251

hyperloo wants to merge 3 commits into react95-io:master from hyperloo:tags

Conversation

@hyperloo
Copy link

@hyperloo hyperloo commented Aug 31, 2021
edited
Loading

Hello Artur Bień,

Tag Component

This is the Tag Component. I tried to make the UI as similar as the SS you have tagged in the issue.

Tags Container Component - Extra Component

This is made with the purpose of Containing the tags at one place.

How I approached

Tag Size

I tried taking the height of the tag as 28px by enlarging Window95 UI to the height of the screen and then measuring the respective size of the tag.

Tag Content Management

I passed an Array of content to the component, which will be basically about the type of content.

[
 { type: 'text', content: 'Microsoft' },
 {
 type: 'image',
 content: MsnImage,
 alt: 'microsoft'
 }
 ]

Screenshot

  • Actual Implementation
    image

  • Story Book Implementation
    image

Features

  • Users can create Tags in different formats (as in the SS) by the different ordering of the contents passed in the contentArray.
  • Users can also give different colors and background colors to the tags by passing them as props.

Note : These are the minimal features that I think (since haven't seen UI in real) should be there. Please guide me what to add more to make the component more interesting.

Bugs

  • Don't know why but the original preview and the preview in the Story Books seem to be different despite having the same Styling. It is my first time with the Story Book so I can't exactly figure it out.
  • Can't Pass SVGs as React Component in the Image in Story Book implementation. Same is working when done by simple implementation.

Todos:

  • Adding .mdx file
  • Adding .specs.js file

Copy link

vercel bot commented Aug 31, 2021
edited
Loading

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/arturbien/react95/2Srz2TGeJDytHHU3skCG4JhqJjd6
✅ Preview: https://react95-git-fork-hyperloo-tags-arturbien.vercel.app

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3e982e9:

Sandbox Source
React95 template Configuration

Copy link
Author

Hello Artur Bień,

Chip Component

This is the Chip Component. I tried to make the UI as similar to what you have instructed in the issue.

Component

<Chip size='md'>

Props

label - Label of the Chip
onClick - onClick Function to the Chip
size - Size of the chip (["sm","md","lg"]) (sm byd default)
fullWidth
backgroundColor
color

Note: BackgroundColor and Color are just optional props. If not provided, Chip will take up respective properties based on the Theme.

Screenshot

  • Default Chip i.e. Small Sized
    image

  • Button with onClick function thus having tabIndex and role as button
    image

  • Box Shadow on Hover
    image

  • Theme based colouring
    image

  • Chip with provided Background Color
    image

  • Chip with provided text color
    image

Bugs

  • MDX not been shown in the StoryBook

Todos:

  • Adding .spec.js file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /