-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #258 from amplifying-fsharp/fsharp-components
Fsharp components
- Loading branch information
Showing
20 changed files
with
785 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"fantomas": { | ||
"version": "6.3.2", | ||
"commands": ["fantomas"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[*] | ||
end_of_line = lf | ||
|
||
# G-Research style, https://github.com/G-Research/fsharp-formatting-conventions/blob/master/.editorconfig | ||
|
||
[*.{fs,fsx,fsi}] | ||
fsharp_space_before_uppercase_invocation = true | ||
fsharp_space_before_member = true | ||
fsharp_space_before_colon = true | ||
fsharp_space_before_semicolon = true | ||
fsharp_newline_between_type_definition_and_members = true | ||
fsharp_align_function_signature_to_indentation = true | ||
fsharp_alternative_long_member_definitions = true | ||
fsharp_multi_line_lambda_closing_newline = true | ||
fsharp_experimental_keep_indent_in_branch = true | ||
fsharp_bar_before_discriminated_union_declaration = true | ||
fsharp_keep_max_number_of_blank_lines = 1 | ||
fsharp_experimental_elmish = true | ||
fsharp_multiline_bracket_style = aligned | ||
fsharp_keep_max_number_of_blank_lines = 1 | ||
|
||
[*.{fsproj,props}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,7 @@ pnpm-debug.log* | |
# macOS-specific files | ||
.DS_Store | ||
|
||
.idea/ | ||
.idea/ | ||
|
||
src/obj | ||
src/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ export default { | |
}, | ||
}, | ||
], | ||
endOfLine: "lf", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module StyledComponents | ||
|
||
open Fable.Core | ||
open Fable.Core.JsInterop | ||
|
||
let styled : obj = import "styled" "styled-components" | ||
|
||
let inline mkStyleComponent tag css = | ||
emitJsExpr (styled, tag, css) """$0[$1]`${$2}`""" | ||
|
||
let inline styledComponent (element : JSX.ElementType) (children : JSX.Element seq) : JSX.Element = | ||
JSX.create element [ "children", children ] |
Oops, something went wrong.