mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 20:54:42 +12:00
feat(ui): shared button styles
This commit is contained in:
parent
590f5bc38e
commit
11b8e387cd
12 changed files with 20 additions and 10 deletions
|
@ -58,7 +58,6 @@
|
||||||
"@vercel/og": "^0.5.4",
|
"@vercel/og": "^0.5.4",
|
||||||
"ariakit": "^2.0.0-next.44",
|
"ariakit": "^2.0.0-next.44",
|
||||||
"bright": "^0.8.2",
|
"bright": "^0.8.2",
|
||||||
"class-variance-authority": "^0.6.0",
|
|
||||||
"cmdk": "^0.2.0",
|
"cmdk": "^0.2.0",
|
||||||
"meilisearch": "^0.32.3",
|
"meilisearch": "^0.32.3",
|
||||||
"next": "^13.4.2",
|
"next": "^13.4.2",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import { buttonVariants } from '@discordjs/ui/Button';
|
||||||
import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
||||||
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
||||||
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
|
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
import { buttonVariants } from '~/styles/Button';
|
|
||||||
import { PACKAGES } from '~/util/constants';
|
import { PACKAGES } from '~/util/constants';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'edge';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import { buttonVariants } from '@discordjs/ui/Button';
|
||||||
import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink';
|
import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink';
|
||||||
import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
||||||
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
||||||
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
|
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { buttonVariants } from '~/styles/Button';
|
|
||||||
import { PACKAGES } from '~/util/constants';
|
import { PACKAGES } from '~/util/constants';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'edge';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { buttonVariants } from '@discordjs/ui';
|
||||||
import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink';
|
import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
@ -5,7 +6,6 @@ import vercelLogo from '~/assets/powered-by-vercel.svg';
|
||||||
import workersLogo from '~/assets/powered-by-workers.png';
|
import workersLogo from '~/assets/powered-by-workers.png';
|
||||||
import { Banner } from '~/components/Banner';
|
import { Banner } from '~/components/Banner';
|
||||||
import { InstallButton } from '~/components/InstallButton';
|
import { InstallButton } from '~/components/InstallButton';
|
||||||
import { buttonVariants } from '~/styles/Button';
|
|
||||||
import { DESCRIPTION } from '~/util/constants';
|
import { DESCRIPTION } from '~/util/constants';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { buttonVariants } from '@discordjs/ui';
|
||||||
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
|
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
|
||||||
import { FiCopy } from '@react-icons/all-files/fi/FiCopy';
|
import { FiCopy } from '@react-icons/all-files/fi/FiCopy';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useCopyToClipboard } from 'react-use';
|
import { useCopyToClipboard } from 'react-use';
|
||||||
import { buttonVariants } from '~/styles/Button';
|
|
||||||
|
|
||||||
export function InstallButton() {
|
export function InstallButton() {
|
||||||
const [interacted, setInteracted] = useState(false);
|
const [interacted, setInteracted] = useState(false);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"~/*": ["./src/*"]
|
"~/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"moduleResolution": "node"
|
"moduleResolution": "bundler"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"],
|
"include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|
|
@ -18,8 +18,14 @@
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"typings": "./dist/index.d.ts",
|
"typings": "./dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
"types": "./dist/index.d.ts",
|
"./*": {
|
||||||
"import": "./dist/index.js"
|
"import": "./dist/*.js",
|
||||||
|
"types": "./dist/index.d.ts"
|
||||||
|
},
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"directories": {
|
"directories": {
|
||||||
|
@ -48,6 +54,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"ariakit": "^2.0.0-next.44",
|
"ariakit": "^2.0.0-next.44",
|
||||||
|
"class-variance-authority": "^0.6.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
export * from './components/Alert.js';
|
export * from './components/Alert.js';
|
||||||
export * from './components/Section.js';
|
export * from './components/Section.js';
|
||||||
|
|
||||||
|
export * from './styles/Button.js';
|
||||||
|
|
||||||
export * from './components/discord/Message.js';
|
export * from './components/discord/Message.js';
|
||||||
export * from './components/discord/MessageAuthor.js';
|
export * from './components/discord/MessageAuthor.js';
|
||||||
export * from './components/discord/MessageAuthorReply.js';
|
export * from './components/discord/MessageAuthorReply.js';
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"~/*": ["./src/*"]
|
"~/*": ["./src/*"]
|
||||||
}
|
},
|
||||||
|
"moduleResolution": "node"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", ".ladle/**/*.tsx", "types.d.ts"],
|
"include": ["src/**/*.ts", "src/**/*.tsx", ".ladle/**/*.tsx", "types.d.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|
|
@ -10,6 +10,7 @@ export default defineConfig({
|
||||||
lib: {
|
lib: {
|
||||||
entry: [
|
entry: [
|
||||||
'src/lib/index.ts',
|
'src/lib/index.ts',
|
||||||
|
'src/lib/styles/Button.ts',
|
||||||
'src/lib/components/Alert.tsx',
|
'src/lib/components/Alert.tsx',
|
||||||
'src/lib/components/Section.tsx',
|
'src/lib/components/Section.tsx',
|
||||||
'src/lib/components/discord/Message.tsx',
|
'src/lib/components/discord/Message.tsx',
|
||||||
|
|
|
@ -2393,6 +2393,7 @@ __metadata:
|
||||||
"@vitest/coverage-c8": ^0.31.0
|
"@vitest/coverage-c8": ^0.31.0
|
||||||
ariakit: ^2.0.0-next.44
|
ariakit: ^2.0.0-next.44
|
||||||
chromatic: ^6.17.4
|
chromatic: ^6.17.4
|
||||||
|
class-variance-authority: ^0.6.0
|
||||||
cross-env: ^7.0.3
|
cross-env: ^7.0.3
|
||||||
eslint: ^8.40.0
|
eslint: ^8.40.0
|
||||||
eslint-config-neon: ^0.1.47
|
eslint-config-neon: ^0.1.47
|
||||||
|
@ -2492,7 +2493,6 @@ __metadata:
|
||||||
"@vitest/coverage-c8": ^0.31.0
|
"@vitest/coverage-c8": ^0.31.0
|
||||||
ariakit: ^2.0.0-next.44
|
ariakit: ^2.0.0-next.44
|
||||||
bright: ^0.8.2
|
bright: ^0.8.2
|
||||||
class-variance-authority: ^0.6.0
|
|
||||||
cmdk: ^0.2.0
|
cmdk: ^0.2.0
|
||||||
concurrently: ^8.0.1
|
concurrently: ^8.0.1
|
||||||
cpy-cli: ^4.2.0
|
cpy-cli: ^4.2.0
|
||||||
|
|
Loading…
Reference in a new issue