Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
probablykasper committed Jan 10, 2024
1 parent 4ccb848 commit 73b7cc5
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 82 deletions.
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ npm install modal-svelte

```svelte
<script>
import Modal from 'modal-svelte'
import Modal from 'modal-svelte'
</script>
<Modal title="Hello world!" onCancel={() => (open = false)}>
<p>Content</p>
<p>Content</p>
</Modal>
```

Expand All @@ -40,30 +40,30 @@ This shows all available functionality

```svelte
<Modal
title="Hello world!"
onCancel={() => (open = false)}
form={() => submitMyForm()}
noEscapeHandling
noCloseIcon
class="w-full"
title="Hello world!"
onCancel={() => (open = false)}
form={() => submitMyForm()}
noEscapeHandling
noCloseIcon
class="w-full"
>
<p>Content</p>
<input />
<p>Content</p>
<input />
<!-- If you want to bring focus to a specific element -->
<input autofocus />
<!-- If you want to bring focus to a specific element -->
<input autofocus />
<div slot="buttons">
<button type="submit">Submit</button>
</div>
<div slot="buttons">
<button type="submit">Submit</button>
</div>
</Modal>
```

```css
:root {
--modal-bg: #fff;
color: #000;
--modal-bg: #fff;
color: #000;
}
```

Expand All @@ -85,20 +85,20 @@ This shows all available functionality

1. Update `CHANGELOG.md`
2. Check for errors
```
npm run lint
```
```
npm run lint
```
3. Bump the version number
```
npm version --no-git-tag <version>
```
```
npm version --no-git-tag <version>
```
4. Generate the package
```
npm run build:package
```
```
npm run build:package
```
5. Publish the package
```
npm publish
```
```
npm publish
```
6. Commit with a tag in format "v#.#.#"
7. Create GitHub release with release notes
74 changes: 37 additions & 37 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,41 @@
{/if}

<style lang="sass">
:global(html, body)
margin: 0px
color: #ffffff
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
.center
display: flex
flex-direction: column
align-items: center
min-height: 100vh
padding: 20px 0px
box-sizing: border-box
font-size: 1rem
background-color: #111318
nav
cursor: default
a
padding: 4px 2px
margin: 0px 2px
font-size: 16px
text-decoration: none
color: hsla(0, 100%, 100%, 0.75)
&:hover
color: #ffffff
button.show
margin-bottom: 20px
.row
margin-top: 8px
display: flex
align-items: center
height: 24px
width: 100%
gap: 20px
input
margin-left: auto
p
max-width: 500px
margin: 0px
:global(html, body)
margin: 0px
color: #ffffff
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
.center
display: flex
flex-direction: column
align-items: center
min-height: 100vh
padding: 20px 0px
box-sizing: border-box
font-size: 1rem
background-color: #111318
nav
cursor: default
a
padding: 4px 2px
margin: 0px 2px
font-size: 16px
text-decoration: none
color: hsla(0, 100%, 100%, 0.75)
&:hover
color: #ffffff
button.show
margin-bottom: 20px
.row
margin-top: 8px
display: flex
align-items: center
height: 24px
width: 100%
gap: 20px
input
margin-left: auto
p
max-width: 500px
margin: 0px
</style>
30 changes: 15 additions & 15 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'

export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit()],
})

0 comments on commit 73b7cc5

Please sign in to comment.