Skip to content

Commit ba07659

Browse files
committed
implemented emotion-js#3320
1 parent cce67ec commit ba07659

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.changeset/feat-styled-tags-export.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@emotion/styled": minor
3+
---
4+
5+
Added ability to import tags directly from '@emotion/styled/tags'

packages/styled/package.json

+15
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@
4444
],
4545
"umd:main": "dist/emotion-styled.umd.min.js",
4646
"exports": {
47+
"./tags": {
48+
"types": {
49+
"import": "./base/dist/emotion-styled-tags.cjs.mjs",
50+
"default": "./base/dist/emotion-styled-tags.cjs.js"
51+
},
52+
"development": {
53+
"module": "./dist/emotion-styled-tags.development.esm.js",
54+
"import": "./dist/emotion-styled-tags.development.cjs.mjs",
55+
"default": "./dist/emotion-styled-tags.development.cjs.js"
56+
},
57+
"module": "./dist/emotion-styled-tags.esm.js",
58+
"import": "./dist/emotion-styled-tags.cjs.mjs",
59+
"default": "./dist/emotion-styled-tags.cjs.js"
60+
},
4761
"./base": {
4862
"types": {
4963
"import": "./base/dist/emotion-styled-base.cjs.mjs",
@@ -177,6 +191,7 @@
177191
"preconstruct": {
178192
"umdName": "emotionStyled",
179193
"entrypoints": [
194+
"./tags.ts",
180195
"./index.ts",
181196
"./base.tsx"
182197
],

packages/styled/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Theme } from '@emotion/react'
22
import styled from './base'
33
import { ReactJSXIntrinsicElements } from './jsx-namespace'
4-
import { tags } from './tags'
4+
import tags from './tags'
55
import {
66
CreateStyledComponent,
77
CreateStyled as BaseCreateStyled

packages/styled/src/tags.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const tags = [
1+
export default [
22
'a',
33
'abbr',
44
'address',

0 commit comments

Comments
 (0)