Skip to content

Commit

Permalink
Remove custom element workarounds
Browse files Browse the repository at this point in the history
Moves style imports to script
  • Loading branch information
sameoldlab committed Jul 31, 2024
1 parent 301f618 commit 4fc54a6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 24 deletions.
4 changes: 1 addition & 3 deletions packages/ui/src/components/AccountModal.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import '../styles/index.css'
import { truncate } from '../utils.js'
import type {
AccountData,
Expand Down Expand Up @@ -97,6 +98,3 @@
</Modal>
{/if}

<style lang="postcss">
@import url('../styles/index.css');
</style>
2 changes: 0 additions & 2 deletions packages/ui/src/components/Common/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
{/if}

<style>
@import url('../../styles/index.css');
dialog:not([open]) {
pointer-events: none;
opacity: 0;
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/src/components/ConnectModal/ConnectModal.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import '../../styles/index.css'
import { onDestroy } from 'svelte'
import copyEN from '../../copy/copy.EN.js'
Expand Down Expand Up @@ -145,11 +146,7 @@
{/if}
</div>
</Modal>

<!-- </Modal> -->

<style>
@import url('../../styles/index.css');
.hide {
display: none;
Expand Down
11 changes: 0 additions & 11 deletions packages/ui/src/components/FractlModal.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
<svelte:options
customElement={{
tag: 'fractl-modal',
shadow: 'none',
props: {
config: { reflect: false, type: 'Object', attribute: 'config' }
}
}}
accessors={true}
/>

<script lang="ts">
import { ConnectModal, AccountModal } from './index.js'
import type { Config } from '@fractl-ui/types'
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/src/components/zorb/Zorb.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import '../../styles/index.css'
import { gradientForAddress } from './lib.js'
export let size = '100%'
export let address = '0x0000000000000000000000000000000000000000'
Expand Down Expand Up @@ -36,7 +37,3 @@
<ellipse fill="url(#gzr)" cx="45" cy="45" rx="45" ry="45"></ellipse>
</g>
</svg>

<style lang="postcss">
@import url('../../styles/index.css');
</style>

0 comments on commit 4fc54a6

Please sign in to comment.