Skip to content

Commit

Permalink
✨ Change to online style for rsc
Browse files Browse the repository at this point in the history
  • Loading branch information
sumin.kim.717 committed Apr 19, 2024
1 parent 51ba60f commit 9de6295
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
1 change: 0 additions & 1 deletion packages/obsidian-callouts-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"test:coverage": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --coverage"
},
"devDependencies": {
"vite-plugin-css-injected-by-js": "^3.4.0",
"vite-plugin-dts": "^3.7.3"
},
"peerDependencies": {
Expand Down
15 changes: 0 additions & 15 deletions packages/obsidian-callouts-markdown/src/assets/styles/callouts.css

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {CalloutComponentProps} from '@/types/callout.ts';
import calloutOptions from '@/core/calloutOptions.ts';
import '@/assets/styles/callouts.css';
import NoteIcon from '@/assets/icons/note.svg?react';

const DefaultCallout: React.FC<CalloutComponentProps> = ({
Expand All @@ -14,12 +13,12 @@ const DefaultCallout: React.FC<CalloutComponentProps> = ({
const Icon = typeof icon === 'function' ? icon : NoteIcon;

return (
<div className="callout-box" style={{backgroundColor: backgroundColor}}>
<div className="callout-title" style={{color: color}}>
<div style={{backgroundColor: backgroundColor, padding: '1rem 1rem 0.625rem 1.5rem', borderRadius: '0.5rem', margin: '0.5rem 0'}}>
<div style={{color: color, display: 'flex', gap: '0.25rem', fontWeight: 600 }}>
<Icon width={20} />
<p>{title ?? type.charAt(0).toUpperCase() + type.slice(1)}</p>
</div>
<div className="callout-body">{children}</div>
<div style={{padding: '1rem 0'}}>{children}</div>
</div>
);
};
Expand Down
2 changes: 0 additions & 2 deletions packages/obsidian-callouts-markdown/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react';
import svgr from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
import dts from 'vite-plugin-dts';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -22,7 +21,6 @@ export default defineConfig({
react(),
svgr(),
dts({rollupTypes: true}),
cssInjectedByJsPlugin(),
tsconfigPaths(),
],
});
36 changes: 28 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5196,7 +5196,16 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -5222,7 +5231,14 @@ stringify-entities@^4.0.0:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -5640,11 +5656,6 @@ vfile@^6.0.0:
unist-util-stringify-position "^4.0.0"
vfile-message "^4.0.0"

vite-plugin-css-injected-by-js@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.4.0.tgz#b09a571ab50744623736a4b056ecc85d7516311a"
integrity sha512-wS5+UYtJXQ/vNornsqTQxOLBVO/UjXU54ZsYMeX0mj2OrbStMQ4GLgvneVDQGPwyGJcm/ntBPawc2lA7xx+Lpg==

vite-plugin-dts@^3.7.3:
version "3.7.3"
resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-3.7.3.tgz#072ec78face3b76a7a492ffeb83469ef5318ce0b"
Expand Down Expand Up @@ -5786,7 +5797,16 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

0 comments on commit 9de6295

Please sign in to comment.