Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jetsly committed Jul 5, 2019
0 parents commit afc0f34
Show file tree
Hide file tree
Showing 44 changed files with 10,202 additions and 0 deletions.
134 changes: 134 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

# Created by https://www.gitignore.io/api/osx,node,visualstudiocode
# Edit at https://www.gitignore.io/?templates=osx,node,visualstudiocode

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### VisualStudioCode Patch ###
# Ignore all local history of files
.history

# End of https://www.gitignore.io/api/osx,node,visualstudiocode
10 changes: 10 additions & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h1 align="center">Ant Design</h1>

<div align="center">

一套企业级的 UI 设计语言和 Svelte 实现。

</div>


[English](./README.md) | 简体中文
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h1 align="center">Ant Design Svelte</h1>

<div align="center">

An enterprise-class UI design language and Svelte-based implementation

</div>

English | [简体中文](./README-zh_CN.md)
8 changes: 8 additions & 0 deletions components/_util/wave.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
import { onMount } from "svelte";
onMount(a => {
console.log(1);
});
</script>
<slot />
35 changes: 35 additions & 0 deletions components/button/button.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<svelte:options tag="a-button"/>
<script>
import "./style/index.js";
import Wave from '../_util/wave.svelte'
export let prefixCls = "ant-btn";
export let type = "default";
export let htmlType = "button";
export let icon;
export let shape;
export let size= "default";
export let loading;
export let disabled;
export let ghost;
export let block;
export let href;
$: buttonProps = {
class: [`${prefixCls}`,`${prefixCls}-${type}`,`${prefixCls}-${size}`].join(' ')
};
</script>
<style>
@import "main.css";
</style>
<Wave>
{#if href}
<a {...buttonProps} {href}>
<slot />
</a>
{:else}
<button {...buttonProps} type={htmlType || 'button'}>
<slot />
</button>
{/if}
</Wave>
18 changes: 18 additions & 0 deletions components/button/demo/basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<cn>
#### 按钮类型
按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮。主按钮在同一个操作区域最多出现一次。
</cn>

<us>
#### Type
There are `primary` button, `default` button, `dashed` button and `danger` button in antd.
</us>

```html
<div>
<a-button type="primary">Primary</a-button>
<a-button>Default</a-button>
<a-button type="dashed">Dashed</a-button>
<a-button type="danger">Danger</a-button>
</div>
```
Empty file.
2 changes: 2 additions & 0 deletions components/button/style/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '../../style/index.less';
import './index.less';
Loading

0 comments on commit afc0f34

Please sign in to comment.