Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarmohit5189 committed Dec 16, 2024
2 parents 12c1ef9 + d7f954b commit 4624c1c
Show file tree
Hide file tree
Showing 1,355 changed files with 7,044 additions and 10,547 deletions.
5 changes: 3 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ only_rules:

included: # paths to include during linting. `--path` is ignored if present.
- ${LINTPATH}
- ios
- macos
- Demos
- Sources
- Tests

excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Fluent UI Apple requires all [pull requests](https://help.github.com/en/github/c

Fluent UI Apple doesn't have any external code dependencies, so developing in the repository is as easy as launching the appropriate Xcode project or workspace and building and running a test/demo app.

For more detailed instructions on how to run the demo app in specific platform, please see [the iOS readme file](ios/CONTRIBUTING.md) and the [the macOS readme file](macos/CONTRIBUTING.md).
For more detailed instructions on how to run the demo app in specific platform, please see [the iOS readme file](Sources/FluentUI_iOS/CONTRIBUTING.md) and the [the macOS readme file](Sources/FluentUI_macOS/CONTRIBUTING.md).

## Checklist before creating a pull request
Fill out all the information in your [PR description](https://github.com/microsoft/fluentui-apple/blob/main/.github/PULL_REQUEST_TEMPLATE.md#pull-request-checklist)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"images" : [
{
"filename" : "FluentUIDemo_iOS.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"filename" : " Icon-16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : " Icon-16_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : " Icon-32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : " Icon-32_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : " Icon-128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : " Icon-128_2x-1.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : " Icon-128_2x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : " Icon-256_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : " Icon-512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : " Icon-512_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
42 changes: 42 additions & 0 deletions Demos/FluentUIDemo/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//

import SwiftUI
import FluentUI

struct ContentView: View {
#if os(macOS)
// Until we have a SwiftUI button on macOS, this will have to do.
private struct ButtonRepresentable: NSViewRepresentable {
func makeNSView(context: Context) -> some NSView {
return FluentUI.Button(title: "Hello, world!",
image: .init(systemSymbolName: "globe", accessibilityDescription: nil))
}

func updateNSView(_ nsView: NSViewType, context: Context) {
}
}
#endif

var body: some View {
VStack {
#if os(macOS)
ButtonRepresentable()
.fixedSize()
#else
Button(action: {}, label: {
HStack {
Image(systemName: "globe")
.imageScale(.large)
Text("Hello, world!")
}
})
.buttonStyle(FluentButtonStyle(style: .accent))
.controlSize(.extraLarge)
#endif
}
.padding()
}
}
Loading

0 comments on commit 4624c1c

Please sign in to comment.