Skip to content

Commit

Permalink
Update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptex committed Jul 29, 2020
1 parent a632878 commit 00cc5d7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ In your HTML/JSX markup:
</div>
```

If you're using React in TypeScript context, you need to extends the JSX `IntrinsicElements` interface so it knows `social-links` element exists.

```typescript
declare namespace JSX {
interface IntrinsicElements {
'social-links': any;
}
}
```

Currently it includes the following:

<div>
Expand Down
10 changes: 10 additions & 0 deletions data/README-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ In your HTML/JSX markup:
</div>
```

If you're using React in TypeScript context, you need to extends the JSX `IntrinsicElements` interface so it knows `social-links` element exists.

```typescript
declare namespace JSX {
interface IntrinsicElements {
'social-links': any;
}
}
```

Currently it includes the following:
6 changes: 3 additions & 3 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ ul {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: space-between;
justify-content: center;
padding: 0;
margin: 0;
list-style: none outside none;
}

li {
padding: 0 0.325rem;
padding: 0.5rem 0.325rem;
}

li a,
Expand Down Expand Up @@ -66,7 +66,7 @@ li svg {
}

.svg-youtube {
width: 3rem;
width: 2rem;
}

.svg-logo {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scriptex-socials",
"version": "1.1.0",
"version": "1.2.0",
"description": "A native web component: links to various social media with SVG icons support",
"scripts": {
"svgo": "svgo -f static/images/svg --config=svgo.yml",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ class Socials extends HTMLElement {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: space-between;
justify-content: center;
padding: 0;
margin: 0;
list-style: none outside none;
}
li {
padding: 0 0.325rem;
padding: 0.5rem 0.325rem;
}
li a,
Expand Down Expand Up @@ -164,7 +164,7 @@ li svg {
}
.svg-youtube {
width: 3rem;
width: 2rem;
}
.svg-logo {
Expand Down

0 comments on commit 00cc5d7

Please sign in to comment.